User Tools

Site Tools


using_led_flash

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_led_flash [2026/07/15 16:33] – [In Action] walkeradminusing_led_flash [2026/07/15 17:15] (current) walkeradmin
Line 66: Line 66:
 </code> </code>
  
-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 243: Line 243:
 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. 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 #ed1c24>*** IMPORTANT ***</color>
 \\  \\ 
 First thing I need to do, because we want this code to run at Pico boot, is to save the file as <color #ed1c24>main.py</color>. The Pico understands that a file called main.py is to be run at boot. First thing I need to do, because we want this code to run at Pico boot, is to save the file as <color #ed1c24>main.py</color>. The Pico understands that a file called main.py is to be run at boot.
 \\  \\ 
 \\  \\ 
 +Please watch the video below to see this code in operation. 
 +\\  
 +\\  
 +{{ :traffic-light-breakout-example-simulated.mp4?894x886 |}} 
 +\\  
 +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 #ed1c24>booting... Press ctrl-c to stop</color>
 +\\  
 +\\  
 +----
using_led_flash.1784133233.txt.gz · Last modified: by walkeradmin