Newb Post: Turning on an LED with Python - Raspberry Pi Forums
hi all,
first time poster here! picked raspberry pi 2 b+ , loving it. have experience programming python, wanted give turning led via code shot. however, far has been unsuccessful! sure missing small step, advice appreciated!
here know:
1. python-dev , python-rpi.gpio packages installed , date (see image01.png). using python 3 this.
2. led , resistor work (tested them separately arduion). led uses pin 25 (blue wire) anode/cathode wired correctly. using gnd (black) , 3.3v (red) (see image02.jpg , image03.jpg).
3. pi cobbler, ribbon cable , breadboard brand new.
4. python code semantically correct: print statement executes, led not turn on (see image04.png).
screen shots available here: https://www.dropbox.com/s/c6ze3fpu1usss ... s.zip?dl=0
tried making "test.py" executable via chmod 755. ran "sudo python test.py", no luck there either! far can tell packages, physical setup , code correct. else causing this?
best,
light_forger
first time poster here! picked raspberry pi 2 b+ , loving it. have experience programming python, wanted give turning led via code shot. however, far has been unsuccessful! sure missing small step, advice appreciated!
here know:
1. python-dev , python-rpi.gpio packages installed , date (see image01.png). using python 3 this.
2. led , resistor work (tested them separately arduion). led uses pin 25 (blue wire) anode/cathode wired correctly. using gnd (black) , 3.3v (red) (see image02.jpg , image03.jpg).
3. pi cobbler, ribbon cable , breadboard brand new.
4. python code semantically correct: print statement executes, led not turn on (see image04.png).
screen shots available here: https://www.dropbox.com/s/c6ze3fpu1usss ... s.zip?dl=0
tried making "test.py" executable via chmod 755. ran "sudo python test.py", no luck there either! far can tell packages, physical setup , code correct. else causing this?
best,
light_forger
hard tell pics vaguely looks both wires of led in row 35, presumably blue connector , + end of led in row 36 when test software. other thing have right gpio pin far can tell looks in right place. connecting led +ve pin ground code looks wrong way round, ie off second on program ends. put in series of on , offs pause between (or use loop)
raspberrypi
Comments
Post a Comment