UDP comunication - Udp.write() problems


hello everyone!


i used code inside link project

https://www.arduino.cc/en/tutorial/wifisendreceiveudpstring

this code, allows send udp packets.
it use function -> udp.write("example!");

but in project, values sensors , then, want send udp packet using udp.write(). have changed values string, , make concatenation "|" separator. final string that:

 string sensors = "mytemperature+"|"+myhumidity;

now want use udp.write(sensors), error....


can me, please. must easy, can't find solution.

thank much




udp.write doesn't take strings.  string class bad idea on micro anyway.  use char array instead of string , won't have problem. 


Arduino Forum > Using Arduino > Programming Questions > UDP comunication - Udp.write() problems


arduino

Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'