Update 2 fields at same time using TCP (3G Module) | Arduino | Forum

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Update 2 fields at same time using TCP (3G Module)
No permission to create posts
October 22, 2018
10:08 am
Avatar
fullrock66
New Member
Members
Forum Posts: 1
Member Since:
October 22, 2018
sp_UserOfflineSmall Offline

Hello Folks, I´m using and Arduino uno and a Telit UL865-NAD module to send T° and Gas Concentration to ThingSpeak, but I don´t know how to send the two values at the same time, my code do this when send T° :

GPRSBee.println("GET https://api.thingspeak.com/update?api_key=WEXO4RBDQ7AOHBW2&field1=0" + valor);

As you can see, I´m sending the T° (valor=T°) to my field1, but I have 2 fields, how I can send Field1=T° and Field2=Gas on the same string?

Hope you can help me!.

Best Regards

October 23, 2018
8:15 am
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 861
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

I was going to suggest you have a look at the documentation for write data:
https://www.mathworks.com/help/thingspeak/writedata.html

But I see there is only one example for writing multiple fields simultaneously. I will add a note to suggest an enhancement to the page.
To write multiple fields simultaneously, append another fieldx with an ampersand.

...https://api.thingspeak.com/update?api_key=WEXO4RBDQ7AOHBW2&field1=0&field2=123&field3=456...

You can update all eight fields and the position and status data with one write operation. (as long as the htttp buffer is large enough to hold the whole command)

Let us know if you get it working, and can you tell us more about the application to measure gas concentration? We are always interested in new applications for ThingSpeak.

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
20 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

briskpanda, Dejw0089, Yassine Ben Salah, anis, 43994554AKS, suda

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457