OpenSprinkler › Forums › Comments, Suggestions, Requests › Opensprinkler on ESP8266 › Reply To: Opensprinkler on ESP8266
The ESP-12E has extra pins broken out but I believe you can’t use them without interfering with the SPI Flash interface which will affect program execution. I’ve based my prototype on the ESP-07, the only real difference between this and the ESP-12 is the ESP-07 has 1MB flash and a ceramic antenna with u.fl external antenna connector while the ESP-12 has 4MB flash and no external antenna interface. Otherwise they are interchangeable.
For now I’m focusing on a minimal hardware implementation to prove the concept. As you can see in the picture, I’ve moved the LCD to a PCF8574 but I messed with the pin assignment to make the layout easier so I’ve a hack to the LiquidCrystal_I2C library. The second SOIC-16 footprint is for another PCF8574 to provide the additional GPIO. I considered just attaching the 74HC595 to the SPI bus (in hindsight I think it should have been done like this from the start) but I’m not sure how invasive code-wise this change would be.
I see now that I should have connected B2 and B3 to the IO expander rather than the ESP module to free up a GPIO to use as an interrupt for state changes like buttons, and other sensors.
The only real gotcha is the ESP8266 has one ADC channel. I guess this can be remedied by either an I2C analog mux or ADC.
At present, I see enabling the ESP platform requiring the following:
1. Inclusion of the LiquidCrystal_I2C library with private changes.
2. Abstraction of the GPIO to use PCF8574/5 ICs
3. Some pin definitions as you’ve stated.
4. Some #ifdef magic to filter out the Ethernet library in favor of the ESP8266WIFI and cousins.
5. Some #ifdef magic to deal with the ESP8266 flash emulated EEPROM.