So I wanted to try out my Raspberry 3B+ once again, but I have been sitting here for hours without even being able to turn on a LED.
My code:
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(4,GPIO.OUT)
GPIO.output(4,True)
time.sleep(5000)
GPIO.output(4,False)
and here is a picture of the guide I was following, and my connection is the same as his:
I wonder if you guys know why it doesn't work? This is in Python because that was what I used to do.
But I also tried Raspberry Pi out with Pi4J in Java - and there the code ran and all but I couldn't get any power from the GPIO pins and that seems to be the case here as well?
I could use all the help I can get! Thanks!
*Edited: I use WinSCP to transfer specific files to my raspberry (I used it for the Java part, shouldn't have an affect) and I usually connect to my Raspberry through my VNC Viewer
I would also like to say that when I tried multiple GPIO pins to debug it I found that in pin 3 ( 2 SDA ) I didnt even have to put it to HIGH for it to light the LED up? I dont know why this happened, what I've read it shouldn't have done that?
I'll go ahead and check it once again tomorrow but this is just an update to the issue! Thank you!
*2nd Update:
I did a "gpio readall" during the run - this is the result - keep in mind that I switched to BCM 4!
When I switched to BCM 4 it had a very low voltage but it light up, without me even activating it? And when I set it to false it doesnt turn off - so something is weird here
Pictures (no resistor in this one):