using_led_flash
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| using_led_flash [2026/07/15 16:29] – [Raspberry Pi Pico W and Pico 2W] walkeradmin | using_led_flash [2026/07/15 17:15] (current) – walkeradmin | ||
|---|---|---|---|
| Line 66: | Line 66: | ||
| </ | </ | ||
| - | What we eed to do now is to place this code, inside of our main program that we want to run on boot. In this example I am using the traffic light example, so when I power on the Pico, the traffic light sequence will start (after the initial 20 second delay). | + | What we need to do now is to place this code, inside of our main program that we want to run on boot. In this example I am using the traffic light example, so when I power on the Pico, the traffic light sequence will start (after the initial 20 second delay). |
| \\ | \\ | ||
| \\ | \\ | ||
| Line 237: | Line 237: | ||
| time.sleep(1) | time.sleep(1) | ||
| </ | </ | ||
| + | \\ | ||
| + | ---- | ||
| + | ==== In Action ==== | ||
| + | \\ | ||
| + | From Thonny, I am going to start our traffic light code with the new breakout code block. Please bear in mind that in this example I am NOT using a Pico W variant. | ||
| + | \\ | ||
| + | \\ | ||
| + | <color # | ||
| + | \\ | ||
| + | First thing I need to do, because we want this code to run at Pico boot, is to save the file as <color # | ||
| + | \\ | ||
| + | \\ | ||
| + | Please watch the video below to see this code in operation. | ||
| + | \\ | ||
| + | \\ | ||
| + | {{ : | ||
| + | \\ | ||
| + | When the start button is pressed (so when the Pico boots) we see the Pico Onboard LED flashing for 20 seconds. Then, the traffic light sequence will start. In the output window we can see the message <color # | ||
| + | \\ | ||
| + | \\ | ||
| + | ---- | ||
using_led_flash.1784132964.txt.gz · Last modified: by walkeradmin
