Wednesday 15 February 2012

Raspberry Pi Simple LED using python and GPIO not working -



Raspberry Pi Simple LED using python and GPIO not working -

i using raspberry pi b+ model out of box. have performed initial setup , trying lite led using gpio pin 7. circuit works when 1 end of led connected straight 3.3 volts , other gnd through resistance. when utilize next code lite led nil seems happen. no errors led remains unchanged.

import rpi.gpio gpio gpio.setmode(gpio.board) gpio.setup(7, gpio.out) gpio.output(7,true)

i have tried "sudo apt-get update" , "sudo apt-get upgrade" . tried replacing gpio.board gpio.bcm , changing pin match bcm number. please tell me bcm stands ?

i have tried restarting device.

i'll reply "what bcm stand for?" part of question: stands broadcom, company makes bcm2835 chip raspberry pi uses. more info here:

http://raspberrypi.stackexchange.com/questions/12966/what-is-the-difference-between-board-and-bcm-for-gpio-pin-numbering

as main part of question, might improve asked on @ http://raspberrypi.stackexchange.com/ site: seems problem connected electronics of pi, rather python code.

python raspberry-pi gpio led

No comments:

Post a Comment