I'm losely following a traffic light tutorial where the following diagram has been provided:
I've followed the diagram, only deviating from the tutorial to use RPi.GPIO in GPIO.BOARD mode.. I had no problem getting the first 3 lights on/off/flashing etc.
I added two more LEDs, using board pin numbers 15 & 16, but can't get them to come on.. I have reduced the code for them all to just:
RED_LED = 11 YELLOW_LED = 12 GREEN_LED = 13 STOP_LIGHT = 15 GO_LIGHT = 16 GPIO.setup(RED_LED, GPIO.OUT, initial=GPIO.HIGH) GPIO.setup(YELLOW_LED, GPIO.OUT, initial=GPIO.HIGH) GPIO.setup(GREEN_LED, GPIO.OUT, initial=GPIO.HIGH) GPIO.setup(STOP_LIGHT, GPIO.OUT, initial=GPIO.HIGH) GPIO.setup(GO_LIGHT, GPIO.OUT, initial=GPIO.HIGH)
The first 3 lights are working fine, the last two aren't at all. I'm obviously a beginner so perhaps i'm missing something? I've got a model B pi, revision 2 board. I'm also using 180Ohm resistors for each cheap 5mm LED since that was the closest I had.