Eric Thompson
Dialight
P/N = 564-0300-132F
Use GPIO6, GPIO19 and GPIO26 to drive the LEDs
GPIO6 = Red
GPIO13 = Yellow
GPIO19 = Green
GPIO12 and GPIO16 drive to ground
# Pi Zero Programming hardware
from gpiozero import *
# Set LED pins to ground
ground12 = OutputDevice(12,True,False)
ground16 = OutputDevice(16,True,False)
# Setup traffic lights
lights = TrafficLights(6,13,19)
# Turn on the lights
lights.on()
# Turn just the Red LED on
lights.red.on()
lights.amber.off()
lights.green.off()
Manufacture = ALPS
P/N = SKHHBYA010
Top Bottom
# Pi Zero Programming hardware
from gpiozero import *
#Set push button input to ground
ground17 = OutputDevice(17,True,False)
# setup the button press
def buttonpress():
print("Button press")
#Setup the button press
button = Button(4)
button.when_pressed = buttonpress
Manufacture = CUI
P/N = CST-931AP
Manufacture = Apem
P/N = MS22R
# Pi Zero Programming hardware
from gpiozero import *
# Set slide switch to high
high24 = OutputDevice(24,True,True)
# Setup Input slide on pin 23
slide1 = InputDevice(23,True)
# Check slide switch
if slide1.is_active:
print("slide switch right")
Manufacture = Maxim Integrated
P/N = MAX31820MCR+
Part | Qty = 1 price | Qty = 25 price |
---|---|---|
3 stack LEDs | $3.28 | $2.15 |
Push button | $0.15 | $0.15 |
Buzzer | $1.34 | $0.93 |
Slide switch | $0.89 | $0.84 |
Temperature sensor | $1.30 | $1.24 |
Photo sensor | $0.95 | $0.86 |
Total = | $7.91 | $6.17 |
See me for a free
GPIO Plus reference board
Eric Thompson
@LowVoltageLabs