User Tools

Site Tools


led

#ON

import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BCM) GPIO.setup(17,GPIO.OUT)

GPIO.output(17,GPIO.HIGH)

#OFF

import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BCM)

Button

http://blog.initialstate.com/raspberry-pi-pressing-buttons-light-leds/ GPIO.setup(17,GPIO.OUT)

GPIO.output(17,GPIO.LOW)

led.txt · Last modified: 2017/05/05 20:55 by zeppo