from machine import Pin import time cn1 = Pin(18, Pin.OUT) while True: cn1.on() print('on') time.sleep(1) cn1.off() print('off') time.sleep(1)