ESP8266 as I2C client I've got an ESP8266 that takes instructions from a web page and sets a series of NeoPixels to flash in different sequences.

I noticed that when the Wi-Fi got data and parsed it, my LEDs would "stutter" as the processor ignored them for a moment while processing the incoming instructions.

So I added a 2nd ESP8266. This one just handles the LEDs. So the 1st ESP gets the Wi-Fi data and parses it. It then sends an interrupt to the 2nd ESP which breaks out of the LED display loop, checks the interrupt pin for HIGH or LOW and sets the LEDS based on HIGH/LOW. 

However, I would like to send more data from the Wi-Fi ESP to the LED driving ESP. e.g. Colour data, transition speed, rotation direction etc. All of these settings I can send to the ESP from a web page.

I thought I2C (the wire library) would help but all comments seem to say that the ESP8266 cannot act as a slave so I can't send to it.

So it appears I'm left with Serial comms (the interrupt is over by the time comm start because I realize Serial does not work in an interrupt).

So my questions are:


Am I right that I2C will not work?
If I am wrong does anyone have a working end to end example?
If I am right is there an approved way to do ESP to ESP serial comms?
I assume that you are using the Arduino core for the ESP8266 (https://github.com/esp8266/Arduino)


  Am I right that ic2 will not work?


I am not certain, but I get the same impression as you.  It seems that the Expressif SDK only supports master mode.


  If I am right is there an approved way to do ESP to ESP serial comms.


There is no "approved way", but there are many ways you can do it.  A direct serial link will give you a simple pipe of data - what you put in at one end comes out the other.  It's up to you to decide how you format and interpret that data.

My ICSC library may help you with that - I use it to connect an ESP8266 to an BeagleBone Black through serial: https://github.com/MajenkoLibraries/ICSC