0

I'm trying to play around with my RaspberryPi a bit and I'm failing miserably... ANY help ist highly appreciated!

I'm on a brand new installation of Raspbian, after "apt-get update && apt-get upgrade".

I set up the wiring exactly as follows (resistor 330 Ohm):

enter image description here

I have followed this tutorial exactly: https://thepihut.com/blogs/raspberry-pi-tutorials/27968772-turning-on-an-led-with-your-raspberry-pis-gpio-pins

The code they suggest is as follows:

import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(18,GPIO.OUT)
print "LED on"
GPIO.output(18,GPIO.HIGH)
time.sleep(1)
print "LED off"
GPIO.output(18,GPIO.LOW)

I execute the script as follows:

sudo pyhton LED.py

The output is as expected:

LED on
LED off

But the LED doesn't turn on at all. I've tried several LEDs and changed all the cables several times. I've used different GND pins. I've changed GPIO pins (and altered the code accordingly). I've swapped resistors several times. All with no luck...

What could I be doing wrong? :-)

EDIT: Added some pictures and screenshots in comments below!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.