GPIO-Led

From aldeid
Jump to navigation Jump to search

Diagram

Python code

import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(18,GPIO.OUT)
GPIO.output(18,GPIO.HIGH) # turn on
GPIO.output(18,GPIO.LOW)  # turn off
GPIO.cleanup()