Sign up ×
Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It's 100% free, no registration required.

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 WiFi 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 wifi 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 WiFi 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 ic2 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.

Richard

share|improve this question

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.