from machine import Pin
import utime
# Define the GPIO for the push button and slide switch
button_pin = Pin(18, Pin.in, Pin.PULL_UP)
switch_pin = Pin(15, Pin.IN) #Pin 15 for the slide switch
while True:
# Check the state of the push button
print("push button ")
print(button_pin.value())
# Check the state of the slide switch
print("push button")
print(switch_pin.value())
# Delay for a short duration to avoid continous printing
utime.sleep(0.5)