[FAQ] How do I send multiple values for a single stream using the Arduino client? 12.29.2014 01:43 PM
Q: Can you give some more detail on how to use the Arduino client library to send multiple values for a single stream?
A: The Arduino library doesn't have a call for a straight POST to one stream. If we did add one, the format would be almost the same as the postMultiple call. To use the postMultiple, you have to define the inputs like this:
streamNames is an array of the streams. counts is an array of the number of points for each stream; so the first stream will have 2 values and the second stream will have 1 value. ats are the timestamps for the values being pushed, and this is a list of timestamps for all your streams in one array. values are the values being pushed to the streams, again with all values for all timestamps in one array. The ats and values arrays are linked by the position of the entries.
So if you want to just send values for a single stream, your declarations would look like this: