Quantcast
Channel: Pimoroni Buccaneers - Latest posts
Viewing all articles
Browse latest Browse all 56246

Explorer HAT and an 8-bit shift register

$
0
0

The Raspberry Pi probably rebooted because you shorted it out. I'd imagine the Raspberry Pi itself will be ok, and the shift registers are pretty tough little chips. The only way to tell is to run the example I give in the tutorial and see if it behaves as expected.

If you clone my fork of the library as follows:

curl get.pimoroni.com/i2c | bash
sudo apt-get install python-smbus
git clone https://github.com/sandyjmacdonald/explorer-hat.git
cd explorer-hat/library
sudo python setup.py install

Then open an interactive Python prompt in the terminal by typing sudo python, and entering the following:

from explorerhat import plugins
shiftreg = plugins.ShiftRegister()
shiftreg.demo()

As I said in the tutorial:

This should blink all 8 LEDs on and off 5 times, run along the line of LEDs 5 times, alternately blink the odd and even LEDs 5 times and run back and forth along the line of LEDs 5 times.

If you don't see that behaviour then you may have either damaged the shift register itself or some of the LEDs, because they're sensitive to polarity and might burn out if connected the wrong way round. Try a new set of LEDs, if you have them.

Let us know how you get on.


Viewing all articles
Browse latest Browse all 56246

Trending Articles