Wiring Forum

All Forums => Electronics Questions => Topic started by: kayden on February 28, 2017, 10:22:58 PM

Title: Raspberry Pi wiring simple LED
Post by: kayden on February 28, 2017, 10:22:58 PM
I'm completely new to hardware in general. I just got a raspberry pi and was messing around trying to get an LED (http://www.kynix.com/Detail/1120638/SPMWHT221MD5WAP0S0.html) to light up.

I have everything wired like the picture below. I am using a 330ohm resister, which I believe is bigger therefore ok then what is required.
(http://openelec.tv/media/kunena/attachments/63336/nWWeN.png)
also (sorry this is my first time using any program to draw a circuit)
(http://openelec.tv/media/kunena/attachments/63336/GTGkK.png)
The program runs successfully, but no light comes on. I know the LED is good as I've tested it on the arduino. Anybody care to explain my wiring fault?
Quote
root@raspberrypi:/home/pi# cat test.py
#!/usr/bin/python
import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BOARD)
GPIO.setup(11, GPIO.OUT)

GPIO.output(11, True)
Changing to GPIO pin 0 results
Quote
Traceback (most recent call last):
  File "test.py", line 5, in <module>
    GPIO.setup(0, GPIO.OUT)
RPi.GPIO.InvalidChannelException: The channel sent is invalid on a Raspberry Pi
root@raspberrypi:/home/pi#