# modules
from machine import Pin
from time import sleep
# setting GPIO Pins 1
# note: any GPIO pin can be used
RedLed = Pin(1, Pin.OUT)
redButton = Pin(2, PULLUP, Pin.ln)
# continuously blink the LEDs at the same time
# while the board has power
while True:
if redbutton is on:
RedLed.on()
sleep(1)
RedLed.off()
sleep(1)