![]() ![]() Connect the Raspberry Pi Pico to your macOS device.How To Program Pi Pico Using Thonny IDE & Blink The Onboard LED Please follow the guide if you have not yet installed the MicroPython UF2 file on Raspberry Pi Pico. We have a guide that explains how to install MicroPython on Raspberry Pi Pico. To program Raspberry Pi Pico RP2040 with MicroPython, we need to save a UF2 file to Pico first. You can leave the other settings unchanged and click on OK.Select MicroPython(Raspberry Pi Pico) from the drop-down list. On the interpreter tab, click below “ which kind of interpreter should Thonny use for running your code?”.On the lower right corner of the IDE, click on Configure interpreter. The Thonny IDE window should now be open.Open Thonny IDE, select your preferred language, and click on the Let’s go button.Once installed, click on Launchpad from the dock and find Thonny.Open the downloaded package and proceed with installation by following the onscreen instructions.Visit the official website and download the version for macOS.Ⓘ If you are using Windows OS to program Raspberry Pi Pico, follow our Getting started guide for Raspberry Pi Pico on Windows. A MacBook running macOS Catalina (version 10.15) was used for making this guide. Raspberry Pi Pico has an onboard LED that will blink when our script successfully runs on Pico. Here, we will use Thonny to write a MicroPython script that will be saved to Raspberry Pi Pico RP2040. ![]() Thonny IDE is one of the most popular IDEs for programming microcontrollers using MicroPython. Feel free to take a look at some of our other tutorials on the Raspberry Pi for inspiration.This guide will walk you through the steps necessary to program Raspberry Pi Pico on macOS devices. You should then see the LED on the Pico flashing on and off every second.Īnd viola, you have fully setup P圜harm with the Raspberry Pi Pico, now you can code to your hearts content. Now try Run ‘Flash main.py’ You will see some red text in the console window showing that the code has downloaded to the Pico. If you don’t see Flash Main.py then right click main.py and click on More Run/Debug > Modify Run Configuration then when the window opens, make sure it says Flash Main.py in the Name field and click OK. Right click on main.py and click on Run ‘Flash main.py’ This will make the on board LED Flash on and off every second. Delete the code that P圜harm puts in and write this in: from machine import Pin Here’s something to get you started and make sure everything is setup correctly. Now you can start doing some programming in MicroPython. If you are using Mac or Linux then open a Terminal and type in “ls /dev/tty.usbmodem*” and look for an entry with a load of numbers after it.Įnter COM# or /dev/tty.usbmodem000000000000# in the Device Path and click OK.īack in the main screen you should see a yellow notice that some packages are required, click on the blue link at the end and P圜harm will install the required packages. Select the Device type as “PyBoard” and enter the Device Path, On Windows you can get this by going to Device Manager and under Ports (COM & LPT) you should see USB Serial Device (COM#). Then click the Tick box “Enable MicroPython support”. ![]() Under Languages & Frameworks, click on MicroPython. Once you are in the main screen we need to tell P圜harm that we are programming in MicroPython so go to File > Settings. ![]() Give it a decent name and leave all the other settings as default. Go back to P圜harm and click on Projects, then click on New Project. Create a new project in P圜harm and configure it for MicroPython Drag the UF2 file you downloaded in to the Pico’s mass storage and it should transfer over and then automatically reboot the Pico.Ĥ. If you’ve got the right cable then it should make a nice bing bong bing sound (on a PC anyway), it should also open folder. Hold down the BOOTSEL button and plug in a Micro USB cable. Download the MicroPython UF2 file for the Pico and install it on to the Pico ( ) Then search for MicroPython in the search bar and click on Install.ģ. Once P圜harm opens you will be presented “Welcome to P圜harm” screen, we need to add the MicroPython plugin so click on Plugins. Once it’s downloaded, run the installer, all the default options are fine so click through them all. Visit the P圜harm website and download the community edition of P圜harm for your operating system. The ones we sell are ideal and are braided so they last longer ( ) Micro USB cable that can do power and data (a lot of cheap cables are power only, you’ll know if when you plug it into your PC, it makes the nice bing bong bing noise). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |