Fast+Reliable Communication Between Arduino and ESP8266 (NodeMCU Lua Firmware)

I have an Arduino Leonardo and an ESP8266 (WEMOS D1 Mini).
I'd like to flash the ESP8266 with the NodeMCU Lua Firmware.

I currently have the Serial1 of the Arduino (Pin 1 & 2) connected through a logic level converter with the ESP board's D1 & D2 pins (GPIO5 & GPIO4). On the ESP I'm then running Software Serial on those pins.

I chose this connection because this way I can still use the primary Serial connections of the two devices for debugging purposes.

I'm running at a baud rate of 115200.

I think I won't be sending more than 100-200 bytes per second in both directions on average. (8 bytes at a time)

What would be a good way of ensuring data integrity and delivery without reinventing the wheel or impacting the performance too much? Every millisecond counts. I'd like to keep the delay very low.
Is there a lightweight protocol that I could use on top of the Serial connection that has libraries on both sides (Arduino IDE & NodeMCU Lua Firmware)?

Or should I maybe consider using something entirely different than a serial connection? Maybe SPI or I²C?

Take a look at CAN, it also has error detection as part of the protocol and you can use long wires.

Thank you. Seems like this requires an additional shield though. I'd like to go with a software solution.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.