raspberry pi led circuit stops working

时间:2017-06-15 09:38:17

标签: python raspberry-pi

I have my circuit hooked up correctly. It's a simple python script running on my RPi 2.

I've done this countless times and I decided to mess around with it today since it's been a while but I know I have the circuit correct and if I hook it up with my 5V, it will stay lit. But if I connect it to a GPIO and use my python script, the LED blinks for a random amount of times (usually for about 3-5 seconds) and then it just stops.

I've tested it with a multimeter and the jumper wires are all working. I tested continuity on the GPIO pin w/ GND and it would beep for as many times as it would make the LED blink and then continuity would stop.

My script continues to run and if I print something during the loop, it will continue to loop.

Everything is pointing to my RPi being broken but I've done nothing to it to break it and it's been sitting quietly since I've last used it.

Does anyone have any insight into this? This is really frustrating because this is just a simple script that should not have any issues.

Occasionally, when I messed with the wires, the LED would momentarily flash but it would be a very weak flash and then nothing. I've also tried to connect it directly to the RPi and skipping the extra wires and it still doesn't work. It seems like the GPIO pin is messed up but I've tried it with multiple GPIO pins.

When I try with other pins (currently using GPIO-07), it will tell me that the pin is already in use, even though it is most definitely not.

I'm also using the same script that I have saved on my Pi from a long time ago. 0 changes made to it but it's no longer looping infinitely, it stops after 4 seconds.

0 个答案:

没有答案