Go Down

Topic: Sending data from Arduino to ESP8266 (Read 1 time) previous topic - next topic

2slow4me

Hey guys, got a quick question. Now, i want to do the following: my Arduino collects sensor measurements (float Temperature, float Pressure, float Humidity), and i want to send them over UART to ESP8266 and receive them so that i can send them on dweet. Now, you might ask yourself "Why don't you just connect the sensor to the ESP?". Well, i'm planning on hooking an 16x2 LCD on the Arduino so i can relay the data there as well. Now, i've tried several codes for both the Arduino and the ESP, and all i keep getting on the ESP is junk ( 8 digit temperature in Celsius for example).

I tried:

1) Serial.print(temperature) on Arduino with Serial.read() on ESP = junk
2) Serial.write(temperature) on Arduino with Serial. read() on ESP = junk
3) Serial.write(lowbyte) +Serial.write(highbyte) with Serial.Read = junk

I assume there's something i'm doing wrong or missing, so i would need some help. I hope someone can provide some quick and easy code samples for me to try since i noticed ESP8266 (i have ESP-01 with the 8 pin in 4x2 layout version) are very common and a lot of people use them. Thanks in advance guys.

Erni

Here's a starting point.
I ones made a two way com between Arduino and ESP8266 using I2C

https://github.com/

dhunink

Did you checked the baudrate of both devices? Jabber is commonly the result of not matching baud rates between devices.

ElCaron

Who wants to take the bet that the Arduino-AVR is completely unnecessary here?

PaulRB

Who wants to take the bet that the Arduino-AVR is completely unnecessary here?
Yes, of course it is. Just get an i2c backpack for the LCD and an i2c temp/humid/pressure sensor such as bme280.

Go Up