If you will be needing the data in or round about the same subnet as your Core is, try TCPClient/TCPServer or UDP, but beware of some little issues (discussed all over the forum ;-))
Otherwise you may well go the Spark.variable() route and if you have a lot of time (aprox. 30sec) you could even send 63byte junks via Spark.publish() but only one junk per second
I want to send the data to a mobile app drawing a graph. The data is recorded sensor data (1 per minute) that will be stored in the core for 24 hours -> 60*24 = 1440 bytes
The app should work in any network, not only the local.
Sure the Spark.variable would then be a possible way - maybe even three variables for an eight hour block each.
But I wouldn’t necessarily dismiss the TCP/UDP route either. If you’ve got the possibility to reach your Core globally (e.g. DynDNS) you could have your Core run a TCPServer or even a Webduinio
Or you could push the data to another server (via TCPClient) from where you’ll pull it into your phone.
There are some threads about that do deal with similar demands to yours - have a search
I just realized that the data I have to send is not an ASCII string, if it contains zeros then it will truncate the string and not send all the rest in that array. So either I have to sacrifice the zero or choose another way. This feels kludgy.
Using the TCP/UDP server seems like a giant overkill thats eating up lots of resurces.
If you are not building a project that will need the given resources for its own functionality there is nothing wrong in using these resources instead of having them lay around unused
It might seem overkill, but it’s not that gigantic really.
But if your use case calls for it, got for it instead of making up workarounds (e.g. zero substitution go shoehorn binary data into a string variable).