Updating Thingspeak channel field1 with array of data | ThingSpeak API | 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
Updating Thingspeak channel field1 with array of data
No permission to create posts
July 25, 2019
4:06 am
Avatar
cmti

Silver
Members
Forum Posts: 13
Member Since:
May 22, 2019
sp_UserOfflineSmall Offline

Hello,

I have an array of data of length 100.Is it possible to update channel's field1 alone with array of data for every 15 sec

July 25, 2019
4:35 pm
Avatar
cstapels
Moderator
Members


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

The maximum for each field is 255 characters. It is not the recommended use to put more than one data point in each field, but it is possible to put multiple values in. You will need to parse the values when you retrieve the data.
You can also cut your data up into multiple segments and write it across the 8 fields every 15 seconds.

July 26, 2019
12:43 pm
Avatar
cmti

Silver
Members
Forum Posts: 13
Member Since:
May 22, 2019
sp_UserOfflineSmall Offline

How can we write multiple values in one filed ?

July 28, 2019
8:42 pm
Avatar
cstapels
Moderator
Members


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

ThingSpeak will treat your entry as a string so you can use any delimiter you like to add multiple values. If they are fixed width, you wont need any delimiter at all. When you update the field, simply append all the values to the end of the GET. For example:
https://api.thingspeak.com/update?api_key=xxxxxxxxxxxxxxxx&field1=0123456abcdefg_or_1,2,3,4,5,a,b,c,d
This command will write
"0123456abcdefg_or_1,2,3,4,5,a,b,c,d"
to field1.
Then you can parse it to separate the values.
If you add &field2= you can addinformation to field 2 in the same write.
https://api.thingspeak.com/update?api_key=xxxxxxxxxxxxxxxx&field1=0123456abcdefg_or_1,2,3,4,5,a,b,c,d&field2=4.345

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:

Team_mafia, icXu, emorphistechno, VTVMART, manimozhi, adamhebrew

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457