CircuitPython Installation

Some CircuitPython compatible boards come with CircuitPython installed. Others are CircuitPython-ready, but need to have it installed. As well, you may want to update the version of CircuitPython already installed on your board. The steps are the same for installing and updating. 

Install the Mu Editor

This guide requires you to edit and interact with CircuitPython code. While you can use any text editor of your choosing, Mu is a simple code editor that works with the Adafruit CircuitPython boards. It's written in Python and works on Windows, MacOS, Linux and Raspberry Pi. The serial console is built right in, so you get immediate feedback from your board's serial output!

Before proceeding, if you'd like to use Mu, click the button below to install the Mu Editor. There are versions for PC, mac, and Linux.

Secrets File Setup

Mobile devices like the Adafruit FONA need to be configured with the access point name (APN) identification with your wireless carrier.

We designed this library to use a file which is in your CIRCUITPY drive to hold secret data including the APN configuration.

Your file should look like this:

# This file is where you keep secret settings, passwords, and tokens!
# If you put them in the code you risk committing that info or sharing it

secrets = {
    "apn": "your_apn_name",
    "apn_username": "your_apn_username",
    "apn_password": "your_apn_password",

In the file, set the apn to the apn name provided by your cellular network carrier.

  • For example, the APN for the Ting network is wholesale.

apn_username and apn_password are optional parameters for authentication. Leave these as-is unless otherwise directed by your network carrier

  • If you are unsure about any of these settings, please contact your network carrier for more information.

CircuitPython Library Installation

First make sure you are running the latest version of Adafruit CircuitPython for your board.

Next you'll need to install the necessary libraries to use the hardware--carefully follow the steps to find and install these libraries from Adafruit's CircuitPython library bundle matching your version of CircuitPython. The FONA Library requires at least CircuitPython version 4.0.0.

Before continuing, make sure your board's lib folder has at least the following files and folders copied over:

  • adafruit_fona
  • adafruit_bus_device
  • adafruit_requests.mpy
  • adafruit_simpleio.mpy

Once all the files are copied, your CIRCUITPY drive should look like the following screenshot:

This guide was first published on May 13, 2020. It was last updated on Jul 22, 2024.

This page (CircuitPython Setup) was last updated on Mar 08, 2024.

Text editor powered by tinymce.