{"id":11128,"date":"2023-10-26T00:00:49","date_gmt":"2023-10-25T21:00:49","guid":{"rendered":"https:\/\/deepbluembedded.com\/?p=11128"},"modified":"2023-11-02T09:10:28","modified_gmt":"2023-11-02T07:10:28","slug":"raspberry-pi-pico-w-circuitpython-getting-started-tutorial","status":"publish","type":"post","link":"https:\/\/deepbluembedded.com\/raspberry-pi-pico-w-circuitpython-getting-started-tutorial\/","title":{"rendered":"Raspberry Pi Pico CircuitPython Tutorial (Pico W Compatible)"},"content":{"rendered":"\n

This tutorial is a getting-started guide for the Raspberry Pi Pico (And Pico W) boards using CircuitPython programming language and Thonny IDE. The RP2040-based Raspberry Pi Pico boards can also be programmed using (C\/C++ SDK, Arduino C++, MicroPython, and Rust). You can find navigation buttons on the left sidebar to go to the Raspberry Pi Pico tutorials series using the programming language you prefer.<\/p>\n\n\n\n

In this tutorial, we’ll set up all the required software tools and get our Raspberry Pi Pico board ready to flash our first CircuitPython LED Blinking test code using Thonny IDE. Without further ado, let’s get right into it!<\/p>\n\n\n

Table of Contents<\/h2>\n
    \n
  1. Raspberry Pi Pico CircuitPython Introduction<\/a>\n\n<\/li>\n
  2. Installing CircuitPython on Raspberry Pi Pico<\/a>\n\n<\/li>\n
  3. Verify The Raspberry Pi Pico CircuitPython Installation<\/a>\n\n<\/li>\n
  4. Programming Raspberry Pi Pico Using CircuitPython<\/a>\n\n<\/li>\n
  5. Raspberry Pi Pico LED Blinking (CircuitPython)<\/a>\n\n<\/li>\n
  6. Raspberry Pi Pico CircuitPython Simulation (Wokwi)<\/a>\n\n<\/li>\n
  7. Concluding Remarks<\/a>\n<\/li><\/ol>\n\n\n
    \n\n\n

    Raspberry Pi Pico CircuitPython Introduction<\/strong><\/h2>\n\n\n

    As stated in the previous tutorial Getting Started With Raspberry Pi Pico (Using MicroPython)<\/a><\/strong>, the CircuitPython<\/strong> is a fork of the MicroPython that was created by Adafruit. It\u2019s the easiest programming experience you could think of thanks to the huge libraries list from Adafruit that includes nearly all sensors and modules that are commonly used in the makers\u2019 space.<\/p>\n\n\n\n

    Programming the Raspberry Pi Pico in CircuitPython is of course one of the easiest options among all and the code will run much slower than Arduino C++ or C. But all in all, this is the most beginner-friendly programming language option out there.<\/p>\n\n\n\n

    For the Raspberry Pi Pico CircuitPython tutorials, we’ll also use the same Thonny IDE<\/strong> that we’re using for MicroPython Tutorials. You can download the IDE here on Thonny.org<\/strong><\/a>. Download the version that suits your operating system and go through the installation steps with all default settings.<\/p>\n\n\n\n


    \n\n\n

    Installing CircuitPython on Raspberry Pi Pico<\/strong><\/h2>\n\n\n

    To prepare your Raspberry Pi Pico for programming with CircuitPython, you need to follow the steps below:<\/p>\n\n\n

    \n\n

    Step #1<\/strong><\/p>\n\n<\/div>\n\n\n

    Hold the BOOTSEL<\/strong> button on the Raspberry Pi Pico board. Then, connect the board to the USB port of your PC. This step is required to operate the microcontroller in the bootloader mode to be ready for firmware flashing. After connecting the board to the USB port, you can release the BOOTSEL button.<\/p>\n\n\n\n

    Note<\/strong>: a new window will open when the USB is connected to your PC, this is where we’ll save our UF2 firmware file.<\/p>\n\n\n

    \n\n

    Step #2<\/strong><\/p>\n\n<\/div>\n\n\n

    You can just download the Raspberry Pi Pico CircuitPython UF2 file from the following links:<\/p>\n\n\n\n