OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Need positive logic from the 74HC595 output › Reply To: Need positive logic from the 74HC595 output
July 6, 2015 at 7:23 pm
#39094
mikek
Participant
I did what I needed by changing the gpio.cpp file like this since I only wanted to effect the serial data to the 74hc595, however if anyone knows what the write function syntax pass it along.
if (pin == 27) {
if (1 != write(fd, &s_values_str[HIGH == value ? 0 : 1], 1)) {
DEBUG_PRINTLN(“failed to write value”);
DEBUG_PRINTLN(pin);
return;
}
}
else {
if (1 != write(fd, &s_values_str[LOW == value ? 0 : 1], 1)) {
DEBUG_PRINTLN(“failed to write value”);
DEBUG_PRINTLN(pin);
return;
}
}