Differences between revisions 1 and 2
Revision 1 as of 2018-06-02 02:41:15
Size: 365
Editor: PieterSmit
Comment:
Revision 2 as of 2018-06-02 02:44:17
Size: 375
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
{{{
Line 17: Line 18:
}}}

# Import the libraries we need
import RPi.GPIO as GPIO
import time
# Set the GPIO mode
GPIO.setmode(GPIO.BCM)
# Set the LED GPIO number
LED = 21
# Set the LED GPIO pin as an output
GPIO.setup(LED, GPIO.OUT)
# Turn the GPIO pin on
GPIO.output(LED,True)
# Wait 5 seconds
time.sleep(5)
# Turn the GPIO pin off
GPIO.output(LED,False)

Pi3/led1.py (last edited 2018-06-02 02:44:17 by PieterSmit)