Header Ads Widget

Getting started with CircuitPython on Raspberry Pi Pico RP2040

CircuitPython is a beginner’s friendly programming language that is a center of attraction for users who are working on low-cost microcontrollers. The demand for low-cost microcontrollers has become high exponentially because of their compact design and high efficiency. Currently one of the most popular low-cost powerful micro-controller in the market is undoubtedly Raspberry Pico. 

The good news for all the CircuitPython users is that the latest update has come would make the users' experience better. In this post, we’ll elaborate on the installation method of CircuitPython in Raspberry Pi Pico along with its latest updates. So let’s start!!!

Power of CircuitPython

CircuitPython is a MicroPython variant that was created to make coding approaches easier for educators and students. The key difference between MicroPython and CircuitPython is that CircuitPython includes the Atmel SAMD21 (also known as M0), whereas MicroPython only supports the Atmel SAMD21 and ESP8266 ports.
CircuitPython is an emerging technique in the programming world that is revolutionizing the way programs are written. Developing scripts that improve the efficacy of learning and working gets easier with CircuitPython.
Because of its ease of use with microcontrollers, CircuitPython has gained a reputation in the market. You don't need to download anything before you start programming; after you've connected your board to the system, simply open the text editor and start typing. Yes, please!!! That's all there is to it.

RP2040 IC

Before understanding the installation process of CircuitPython let’s dig some more about the microcontroller. The strong IC RP2040, which surprisingly provides a lot of power for a low price, allows the Raspberry Pi Pico to have a small footprint. It has a low-power ARM processor and dual Arm Cortex-M0+ processors, which let the Raspberry Pi Pico run faster.

The Raspberry Pi Foundation has made some incredible advancements in the technology business that benefit all computer fans. They changed the tech world with the smartest single board computers, and now the innovative and high-tech Raspberry Pi Pico is ready to go.

CircuitPython with Raspberry Pi Pico

You can use C/C++, which is wonderful because it allows consumers to get the most out of it. MicroPython and CircuitPython ports are available on the Raspberry Pico.
When it comes to our personal experience, CircuitPython is the best and simplest approach to learn about the Raspberry Pi Pico. It provides excellent support for drivers, sensors, and other peripherals that improve the user's experience.
Instead of built-in flash memory, the RP2040 has a large amount of onboard RAM of 264kb. The external SPI chip, which has 2 MB of memory, fills this gap, which is shared between the running program and any file storage utilized by CircuitPython or MicroPython. You can get the entire flash memory if you use C/C++, but 
only 1MB will be left for the image, codes, and other data if you use Python.

Installation of CircuitPython

You can use this link to download the latest version of CircuitPython. Now when the download is complete then save it and then do the following.

Download CircuitPython For Pico

  • Start from your Pico and unplug it from USB.
  • Hold down the BOOTSEL button, don’t let it go, while plugging the Pico in USB.
  • Hold the BOOTSEL till RPI-RP2 drive appears on the screen!.

  • If the drive does not appear on the screen then repeat the process again
  • Drag the adafruit_circuitpython_etc.uf2 file to RPI-RP2.
  • Now CIRCUITPY appears on the screen, and RP1-RP2 will disappear.

  • Voila! You are done! , CircuitPython is Now Successfully installed on your Raspberry Pi Pico RP2040 Board.
  • How to use CircuitPython on Pico?

    Once you are done with the above steps, you can open CIRCUITPY drive where you will find these files.

    • The "lib" folder is used to store library files required as per your project requirement.
    • "boot_out.txt" is used to show the information of the current circuitpython build.
    • "code.py" is the main python file that get executed when the system start. To edit this file you can download and install "Thonny ide".

    Post a Comment