Float and unsigned long into string... how? | Arduino | Forum


Please consider registering

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
Float and unsigned long into string... how?
No permission to create posts
February 4, 2012
8:36 pm
New Member
Forum Posts: 1
Member Since:
February 4, 2012
sp_UserOfflineSmall Offline


 A new user here, just starting peeking around and i love thingspeak!

I have and arduino 2009, IDE 22, and 8 var that I'd like to send to thingspeak.

Actually I have these:

  float toutES; // tout DHT
  float houtES; // rh out DHT
  float tinES; // tin DHT
  float hinES; // rh in DHT
  float T1ES; // h20
  float T2ES; // hot
  unsigned long mediaHzES; // light
  int statusSSRES; //status SSR


Can you help me build a string to send data?

I'm still neewbe in C.

I'm using the updateThingSpeak fx from the example and everything works fine for the unsigned int, but I don't know how to build the real string.


Thank you!

February 5, 2012
4:54 pm
Natick, MA

Forum Posts: 397
Member Since:
January 18, 2011
sp_UserOfflineSmall Offline

Your final string, will need to look like 1=(value)&2=(value)&3=(value) and so on.

The 1,2,3 correspond to the fields inside of a channel. BTW. 1,2,3 is shorthand for "field1", "field2", and "field3".

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 261

Vinod: 196

piajola: 85

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

Newest Members:

terranceqh2, DianeEmids, Alanawaype, uqovitay, ufijifode, manish01

Administrators: Hans: 387, lee: 457