Save Code and Run Code Automatically | Pi Pico | Pi Pico 2 | MicroPython (2025)
Channel:
Subscribers:
6,180
Published on ● Video Link: https://www.youtube.com/watch?v=VJTWUYl3h20
Save Code and Run Code Automatically | Pi Pico | Pi Pico 2 | MicroPython (2025)
00:07 -Introduction
00:46 - Connect Pi Pico To PC
01:14 - Save Python File To Raspberry Pi Pico
02:49 - Save Files Saved To Pi Pico
03:58 - Main.py | Run Pi Pico Code Automatically
CODE START
import machine
import time
Get the onboard LED pin. On the Pico W, this is usually GP25.
led = machine.Pin("LED", machine.Pin.OUT)
Flash the LED forever (or until you interrupt the program).
while True:
led.value(1) # Turn the LED on
time.sleep(0.5) # Wait for 0.5 seconds
led.value(0) # Turn the LED off
time.sleep(0.5) # Wait for 0.5 seconds
CODE END