OpenSprinkler Forums OpenSprinkler Unified Firmware Need positive logic from the 74HC595 output Reply To: Need positive logic from the 74HC595 output

#42333

mikek
Participant

UPDATE:If you are using this modification to get reverse logic you will not be able to update to firmware 2.1.6(1) OSPI-AC until you get rid of the changes. The git pull command will give you a warning and quit. If you want to update your firmware you will need to abandoned this mod and modify the apply_all_stations_bits as suggested by Ray (a better and easier way to do it anyway).

To fix things do:
cd OpenSprinklerGen2
mv gpio.cpp gpio.old
git pull
nano OpenSprinkler.cpp

Change line 669 in OpenSprinkler.cpp from

digitalWrite(pin_sr_data, (sbits & ((byte)1<<(7-s))) ? HIGH : LOW );
To
digitalWrite(pin_sr_data, (sbits & ((byte)1<<(7-s))) ? LOW : HIGH );

ctrl-x and y to save

Then
sudo ./build.sh ospi
sudo /etc/init.d/OpenSprinkler.sh restart