So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By DigitalMeth
#68204 Hi guys, I have one quick question.

I am sending data from Arduino to ESP8266, and then sending them to server. Everything works OK except for this part:

The "int" variable on Arduino is 2 bytes long and the "int" on ESP8266 is 4 bytes. If the number that I am sending through the serial line can be fit in 1 byte it works OK, but for larger numbers the data is shorter for 512 or 1024.

What is the best way to send float values from the Arduino to the ESP8266? Also I tried casting them into array of bytes and using Serial.write(buffer,length) and Serial.Readbytes