User Tools

Site Tools


using_a_breakout_button

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
using_a_breakout_button [2026/07/15 19:50] – [The Code] walkeradminusing_a_breakout_button [2026/07/15 20:02] (current) walkeradmin
Line 84: Line 84:
     if button.value() == 0:   # Button pressed (LOW)     if button.value() == 0:   # Button pressed (LOW)
         print("Button pressed — stopping program.")         print("Button pressed — stopping program.")
 +        all_off()
         break                 # Exit the loop and end main.py         break                 # Exit the loop and end main.py
 ####################### CHECK BREAKOUT BUTTON ########################## ####################### CHECK BREAKOUT BUTTON ##########################
Line 120: Line 121:
 \\  \\ 
 === Example === === Example ===
 +\\ 
 +<color #ed1c24>***Remember*** - We must save this code to our Raspberry Pi Pico as a file called main.py.</color>
 +\\ 
 +\\ 
 +This will enable to code to run on the Pico boot up.
 +\\ 
 \\  \\ 
 Here is the button in action. Here is the button in action.
using_a_breakout_button.1784145035.txt.gz · Last modified: by walkeradmin