i think the only confusing part was not realizing i needed to set the GPIO to pull up (
gpio_pull_up(BUTTON_PIN)); i was wondering if i had wired up the button wrong. this encouraged me to set the LED to default on (so pressing the button turns it off), so that at least i knew the board was powered up :/.
thanks to Ramji for a basic tutorial here, which helped me build out the C version, and the pico-examples for interrupts which made the code more "elegant" than just checking state and sleeping.

No comments:
Post a Comment