Panel Cookies
Raspberry Pico Permanent code
13/02/2021 | Views: 12804 | Arduino | by: ELECTRONOOBS      

But wait a minute. If I disconnect the USB cable and plug it back in, as you can see in the video below, the LED is not blinking anymore. Well that’s because we were running the py code from our PC. If you want the code to automatically run when you power the raspberry PICO, you need to add that code to the microcontroller.


Here’s how we make the code run automatically from the pi. Create a new file in thonny. Click save and here, select to save it to the raspberry pico. Now is important to name this file If you give it a different name, it won’t run automatically. The Pi is always looking for a main dot pi file. Add your code inside this file. Now, when you click the save button, the changes are saved to the file that’s on the microcontroller memory. As you can see below, the LED is blinking. I remove the USB cable and connect it back on. And there you go, the LED is blinking automatically without me running it from the PC. Nice!

micropython permanent code

13/02/2021 | Views: 12804 | Arduino | by: ELECTRONOOBS      

Last tutorials

All about Arduino PWM frequencies
Debug Arduino and ESP with PlatformIO
Homemade Best Two Hand Multimeter with Arduino
Homemade Baby White Noise Generator
Measure AC RMS with Arduino


Affiliate Disclosure


PCBWAY PCB service

Curso Arduino Online nivel bajo