Explorer HAT and an 8-bit shift register


#1

Hi, I was trying tutorial with shift register.

When my circuit setup was ready, I put last cable to 5V. After that my raspberry pi turned off. I’ve checked my circuit and I realized, that I put shift register wrong way. So I unpluged 5V cable, and put register to correct way. After that everything looks ok. I don’t know if shift register works how it should… Sometimes one diode is turned on sometimes two or three…

But my question is. Could I accidentally damaged something? (shift register, explorer hat, raspberry pi) or there is some security check and pi turned off because of that…

thank you


#2

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.