import RPi.GPIO as GPIOimport time# blinking functiondefblink(pin): GPIO.output(pin,GPIO.HIGH) time.sleep(1) GPIO.output(pin,GPIO.LOW) time.sleep(1)return# to use Raspberry Pi board pin numbersGPIO.setmode(GPIO.BOARD)# set up GPIO output channel, we set GPIO4 (Pin 7) to OUTPUTGPIO.setup(7, GPIO.OUT)# blink GPIO4 (Pin 7) 50 timesfor i inrange(0,50):blink(7)GPIO.cleanup()