#Button Pulls
1 messages · Page 1 of 1 (latest)
That's not working either. No syntax error, but the values are still reversed. I looked at the datasheet for the Cytro Maker Pico, and I see it mentions for the buttons "* Rev1.2.0 = Pulled-up permanently on hardware with debouncing capacitor."
the prints would still be reversed because it's printed before the if statment. I would recomend to change your loop like this:
while True:
if not button_1.value:
print("Button is pressed")
pixels.fill(RED)
time.sleep(0.5)
this way the print is inside of the if statement and the not reversing the logic will affect the print statement.
Thanks Foamyguy. I got it working. I appreciate your help with this community.