No problem to chose your own filename of course. In our case, we chose to save it on our Pico board. You can either save it on your computer or on your Pico board. Don’t remove the “tab” before led.toggle() and time.sleep(1) Write or paste following code in the IDE: from machine import Pin import time led = Pin(25, Pin.OUT) while True: led.toggle() time.sleep(1) Be careful, MicroPython is whitespace-sensitive. Let blinking an LED is often used as the ‘Hello world’ program for microcontrollers :-). The aim is here to write a very basic script to let blink the onboard LED of the Pico board. This method is explained in the official Raspberry Pi Documentation. And if for some reasons you got an error message, you can also install the firmware on your Pico with a drag and drop procedure. If you have previously stored scripts on your already used board, they won’t be overwritten with this operation. It only takes a few seconds to install the firmware. Click on the ‘Install’ button to start the firmware installation. Install MicroPython firmware on the Raspberry Pi PicoĪs soon as you chose to change the interpreter to MicroPython (and your Pico is connected to your computer), a PopupWindow appears asking you to install the MicroPython firmware on the Pico board.You can do this by clicking on the “Python” text at the right bottom of the Thonny window. As the default interpreter for Thonny is Python 3, we need to change it to MicroPython. MicroPython is a Python Language Interpreter that is developed for Microcontrollers as our Pico. To program our Pico board, we use MicroPython. Consult our tutorial “How to update your Raspberry Pi to the latest version” before continuing. If you don’t find “Tonny” between your applications, then you probably don’t have the latest version of Raspberry Pi OS. ![]() You can find Thonny in the applications menu (left upper corner of your screen) as shown in the figure below. You can close the Popup window “Removable medium is inserted”. If necessary, repeat step 2 and/or check your USB-cable.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |