using_the_pico_run_button_-_simple
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| using_the_pico_run_button_-_simple [2026/07/16 15:59] – [Introduction] walkeradmin | using_the_pico_run_button_-_simple [2026/07/16 16:29] (current) – walkeradmin | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| ===== Introduction ===== | ===== Introduction ===== | ||
| \\ | \\ | ||
| - | The Raspberry Pi Pico has a RUN pin, see below. | + | We can reset the Pico at anytime if we have a way to ground the Pico RUN Pin, Pin30 to GND. This will at a hardware level instantly restart the Pico, no user created code is required for this, it is all hardware level. This provides us with a very simple way of restarting some code, if we need to. |
| + | \\ | ||
| + | \\ | ||
| + | The Raspberry Pi Pico has a RUN pin on Pin30, see below. | ||
| \\ | \\ | ||
| \\ | \\ | ||
| Line 20: | Line 23: | ||
| {{ : | {{ : | ||
| \\ | \\ | ||
| - | The code we are going to use is a simple piece of Micro Python to flash the onboard LED, sadly the code for the Wifi Pico (PicoW | + | The code we are going to use is a simple piece of Micro Python to flash the onboard LED, this code works on both the Wireless |
| \\ | \\ | ||
| \\ | \\ | ||
| - | === Pico W Code === | + | === Pico Code === |
| - | \\ | + | |
| - | <code | download> | + | Download this code and save it to your Pico in a file called <color # |
| + | |||
| + | <code: | ||
| from picozero import pico_led | from picozero import pico_led | ||
| pico_led.blink(0.1) | pico_led.blink(0.1) | ||
| </ | </ | ||
| + | |||
| + | If you reboot the Pico (unplug it and plug it back in) the main.py file will be loaded on boot, and the onboard LED will start to flash. | ||
| + | \\ | ||
| + | \\ | ||
| + | {{ : | ||
| + | \\ | ||
| + | Looking at the video above, we can see the code that flashes the LED is running, we press the button that connects the RUN button to GND, this resets the Pico. The Pico then reboots and runs the code main.py again (the led flash code). | ||
| + | \\ | ||
| \\ | \\ | ||
| + | ---- | ||
| + | |||
| + | |||
using_the_pico_run_button_-_simple.1784217558.txt.gz · Last modified: by walkeradmin
