OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Relais are inverse Reply To: Relais are inverse



I connected a 74HC595N to a raspberry pi and I had the same problem, by default all relais are on. To solve the problem
I edit OpenSprinkler.cpp on the OpenSprinkler-firmware directory and in the function “OpenSprinkler::apply_all_station_bits()” at line 1079 add a “~” like this: “digitalWrite(pin_sr_data, (~sbits & ((byte)1<<(7-s))) ? HIGH : LOW );” and recompile the firmware.