A shift register abstraction in Golang

This builds up on the Golang ar150gpio package I made for accessing the GPIOs of the GL.iNet AR-150 router. If you are interested, here is the blog entry for it.

As the number of outputs of the router is limited, I decided to write an abstraction for use with the shift register 74HC595N to expand the number of output pins available. This takes care of the details of using the 74HC595N.

Schematic that I made

You could cascade more shift register if you want or need more output pins.

https://youtu.be/iBXCgAxSjgA
Demo of the code running

The LEDs used here are buffered. Actually, it is a module called I/O LED monitor. The router has a 5v and GND pin available, the LEDs get there power from there.

The link for the Github repository of this project can be found here. Obviously, this can be ported to other systems/languages because the principle is the same.

I will utilize this abstraction for use to an LCD that has an HD44780.