Thanks for your help.
I sent JSON string data from ESP32 board to the Raspberry Pi using uart port.
But I have another problem.
I tried to send a simple string data from the raspberry pi to esp32 board using serial2(IO16 and IO17).
But it doesn’t work. The esp32 doesn’t receive anything from the serial2 port.
I sent the string data from the esp32 to the raspberry pi using serial2 port successfully.
I attached my code for raspberry pi and esp32.
- Zerynth code for esp32 board
- python code for raspberry pi
if name == “main”:
ser = serial.Serial('/dev/ttyAMA0', 9600, timeout=1)
length = ser.write(b"Hello from Raspberry pi\n")
As I mentioned above, the sending from esp to raspberry pi is working well.
However, when I send the data from raspberry pi to esp32, the esp32 doesn’t receive anything.
The raspberry pi code runs without any error. In the code, length = ser.write(b"Hello from Raspberry pi\n") returns the number of bytes of data sent.
What’s the strange for me is that length = s2.available() is always 0 in the zerynth code.
I have been working all day on this issue. I’m very struggling with this issue.
I REALLY hope you get back to me with the best solution as soon as possible.
Thanks in advance.