OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Change Firmware to control stations directly via GPIO pins (relays) › Reply To: Change Firmware to control stations directly via GPIO pins (relays)
For the buttons – You’re going to have to examine how you’ve set PIN_BUTTON_1, PIN_BUTTON_2, PIN_BUTTON_3 in your defines.h and where they are used in the code to ensure that when the relays are triggered, the code isn’t reading the same pin e.g. digitalReadExt(PIN_BUTTON_xx).
The display is far more embedded. If I recall, the code already handles detection of a display if present, but if you’ve tried using the SDA (GPIO4) / SCL (GPIO5) pins already and it hasn’t worked, you may need to remove references to it in the code, e.g. remove the #include statements for the display library (SSD1306Display.h). If you still have issues, possibly comment out sections of code which call the display library -e.g. lcd.init(); or write to or clear the display (lcd_print… etc. )
Using the display pins goes beyond what I was aimig to do, so I can really only provide general guidance here.
Also – you need to be aware of what Ray mentions above – the behaviour of the pins and their default states at power-on. You will need to look at the esp8266 reference material for the expected default states of the pins you’re intending to use and see if your use is consistent. If not, you may find the module doesn’t even power on.
I hope that helps.