from machine import Pin, PWM
import time
r = PWM(Pin(0))
g = PWM(Pin(1))
b = PWM(Pin(2))
p1
while True:
if button.value() == 0: # Check if the button is pressed
led.value(1) # Turn on the LED
else:
led.value(0) # Turn off the LED
time.sleep(0.1) # Short delay to reduce CPU usage