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



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 );
digitalWrite(pin_sr_data, (sbits & ((byte)1<<(7-s))) ? LOW : HIGH );

ctrl-x and y to save

sudo ./ ospi
sudo /etc/init.d/ restart