How could I use serial read block to read message from other mcu with ESP32 board?
Could I use serial read block to read message from other mcu with ESP32 board?
Comments (7)
-
repo owner -
Hi Tom,
connect the boards with shared GND, power, and criss-cross TX and RX pins:
ESP322 OTHER
tx = 17 rx = ??
rx = 16 tx = ??
Then set the baud rates on both sides to the same value.
Individually or in a read loop, use serial read to get bytes. they will be in byteArray format, values 0-255 for each character read.
To convert to string, use the join block with an empty slot and the byteArray value(s).
Alternatively, you can connect ESP32 Tx and Rx to each other and do a loop test all in MicroBlocks, get your working and then use the other end to communicate.
Good Luck.
-
repo owner Thanks for providing those detailed instructions, Turgut.
-
reporter -
reporter @Turgut Guneysu
Thanks a lot for your detailed instructions. I made it.
Two ESP32 boards run MicroBlocks communicate with each other.
MicroBlocks read message from Arduino board.
-
reporter - changed status to resolved
Thanks John Maloney and Turgut Guneysu.
I made it.
-
repo owner Glad you got it working! Thanks for sharing your test projects.
- Log in to comment
Yep! Just connect the TX pin of one board to the RX pin of the other and vice versa.
You can find the serial pins for various boards here.