OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Technical Documentation on GPIO / Zones? Reply To: Technical Documentation on GPIO / Zones?

#38718

Ray
Keymaster

@jakestevenson, I think you may be confusing the low-level code that sends data to the shift register vs. the web API that tells the controller to open a station through the HTTP command. For the former, OpenSprinkler uses shift register to control stations / sprinkler solenoids, the reason is this makes it much easier to expand to multiple stations without having to occupy more microcontroller GPIO pins. The code that implements the shift register operation is all in apply_all_station_bits() function in OpenSprinkler.cpp. In addition, you can check the following link to see examples of how to get Arduino to work with shift register:
https://www.arduino.cc/en/Tutorial/ShiftOut

The web API is explained in the Firmware API document. This allows you to open/close a station by sending an HTTP command.