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?