import RPi.GPIO as gpio #adds main header file
import time #adds timer header file
gpio.setmode(gpio.BOARD) #sets as the pin number in board
gpio.setwarnings(False) #disable warnings
gpio.setup(40,gpio.OUT) #set 40 pin as output
while True: #starts infinite loop
gpio.output(40,1) #writes a digital value to it
print ‘led is on’
time.sleep(.5) #sleeps one seconds
print(‘led is off’)
gpio.output(40,0) #writes a digital value to it
time.sleep(.5) #sleeps one seconds