import machine
# set up pins as 'toe and'heel' footswitch inputs
heelswitch = machine.Pin(6, machine.Pin.IN, machine.Pin.PULL_DOWN)
toeswitch = machine.Pin(9, machine.Pin.IN, machine.Pin.PULL_DOWN)
#Setup the external LEDs outputs
LED_red = machine.Pin(11,machine.Pin.OUT)
LED_green = machine.Pin(20,machine.Pin.OUT)
while True: #Main code which runs unless interrupted
LED_red.value(heelswitch.value()) #LED is off
LED_green.value(1)
#print('red off, green on') #print statements to communicate what's happening in the program
#time.sleep(1) #cycles main loop at 1Hz
while True:
LED.value(Button.value())
#next stage: test input buttons work LEDs
Foot
Foot lifts when load on
footswitch is released