05-29-2016, 08:25 AM
(This post was last modified: 05-29-2016, 08:26 AM by martinayotte.)
Here is a quick example of GPIO LED Blinker :
Code:
import RPi.GPIO as GPIO
LED_PIN = 26
GPIO.setmode(GPIO.BCM)
GPIO.setup(LED_PIN, GPIO.OUT)
while 1:
GPIO.output(LED_PIN, GPIO.HIGH)
time.sleep(0.25)
GPIO.output(LED_PIN, GPIO.LOW)
time.sleep(0.25)
GPIO.cleanup()