MATLAB Answers

Multiple Values in one Field

12 views (last 30 days)
Fabian Boruta
Fabian Boruta on 17 Apr 2019
Answered: Navadeep Ganesh U on 12 Jan 2020 at 10:22
Hello,
I am still quite new at Thingspeak and do not yet have the idea where to look exactly. As a result, I spent the last few hours trying to find a solution to my problem, unfortunately without success. My problem is, we have 8 fields per channel, but I have a sensor package with 10 parameters. Can I insert several parameters into one single field using an Arduino code or do I have to create a new channel separately and then merge them using the example you provided? For example, I wanted to send the dust fractions for p10 and p25 in a field. I hope you can help me:)

  0 Comments

Sign in to comment.

Accepted Answer

Vinod
Vinod on 7 May 2019
You can pack more data into a field, but, you will have to use your own algorithm in MATLAB to unpack the data and update MATLAB visualizations to see the data. Built in charts on ThingSpeak assume a single value per field.

  0 Comments

Sign in to comment.

More Answers (1)

Navadeep Ganesh U
Navadeep Ganesh U on 12 Jan 2020 at 10:22
Updating multiple values to a field is not allowed in thingspeak. To update multiple data , you need to Cascade thingspeak.write. Its something like this.
String sendData = apiKey+"&field1="+String(temp)+"&field2="+String(humi)+"\r\n\r\n";
or,
ThingSpeak.setField(1, (float)temp);
ThingSpeak.setField(2, (float)humi);
ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey);

  0 Comments

Sign in to comment.

Sign in to answer this question.