esp8266 to web..field update


hey new arduino..messing around new esp8266..trying send temperature data thingspeak..have working update 1 field on channel setup.  im having problem code update 2 fields @ same time...the following working update 1 field string tempf.
   // prepare string
  string getstr = "get /update?api_key=";
  getstr += apikey;
  getstr +="&field1=";
  getstr += string(tempf),
 
  added following in order update 2 fields 2 strings...all update field2 only...

   // prepare string
  string getstr = "get /update?api_key=";
  getstr += apikey;
  getstr +="&field1=""&field2=";
  getstr += string(strtemp), string(tempf);

just wondering if give me little guidance..thanks.
 

quote
just wondering if give me little guidance..thanks.
sure. print string constructing. you'll see why wrong. after ? comes name = value pair, & , name = value pair. not constructing.

and, misusing comma operator.


Arduino Forum > Using Arduino > Programming Questions > esp8266 to web..field update


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code