Search for: Log In Register OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Change Firmware to control stations directly via GPIO pins (relays) This topic has 1 reply, 1 voice, and was last updated 1 year, 2 months ago by Tobasco. Viewing 2 posts - 1 through 2 (of 2 total) Author Posts March 14, 2021 at 9:48 pm #69430 TobascoParticipant Hi, after my beloved OS Bee died and I couldn’t fix it, I decide to set up a new one based on an “ESP8266 WIFI 4 Channels Relay Module AC/DC ESP-12F Development Board”. The flashing, WiFi connection and OLED Display works already, now I want to change the firmware to control the 4 relays via the GPIO pins GPIO16 (D0) GPIO14 (D5) GPIO12 (D6) GPIO13 (D7) May you give me a hint, which part of the code I have to change so that Station 1 to 4 is linked to this GPIO pins? salute Thomas March 15, 2021 at 11:00 am #69440 TobascoParticipant Hi, I solved my problem by replacing apply_all_station_bits() with custom code to control the GPIO pins for the relays: void OpenSprinkler::apply_all_station_bits() { const uint8_t stationGPIO[] = {16, 14, 12, 13}; for (uint8_t i = 0; i < 4; i++) { pinMode(stationGPIO[i], OUTPUT); digitalWrite(stationGPIO[i], station_bits[0] & 1 << i ? HIGH : LOW); } } salute Thomas Author Posts Viewing 2 posts - 1 through 2 (of 2 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Change Firmware to control stations directly via GPIO pins (relays)