To use all the amazing features of your MagTag with CircuitPython, you must first install a number of libraries. This page covers that process.
Get Latest Adafruit CircuitPython Bundle
Download the Adafruit CircuitPython Library Bundle. You can find the latest release here:
Download the adafruit-circuitpython-bundle-version-mpy-*.zip bundle zip file, and unzip a folder of the same name. Inside you'll find a lib folder. The entire collection of libraries is too large to fit on the CIRCUITPY drive. Therefore, you'll need to copy the necessary libraries to your board individually.
At a minimum, the following libraries are required. Copy the following folders or .mpy files to the lib folder on your CIRCUITPY drive. If the library is a folder, copy the entire folder to the lib folder on your board.
Library folders (copy the whole folder over to lib):
- adafruit_magtag - This is a helper library designed for using all of the features of the MagTag, including networking, buttons, NeoPixels, etc.
- adafruit_portalbase - This library is the base library that adafruit_magtag is built on top of.
- adafruit_bitmap_font - There is fancy font support, and it's easy to make new fonts. This library reads and parses font files.
- adafruit_display_text - This library displays text on the screen.
- adafruit_io - This library helps connect the MagTag to our free data logging and viewing service
- adafruit_minimqtt - This library provides MQTT service for Adafruit IO.
Library files:
- adafruit_requests.mpy - This library allows us to perform HTTP requests and get responses back from servers. GET/POST/PUT/PATCH - they're all in here!
- adafruit_fakerequests.mpy - This library allows you to create fake HTTP requests by using local files.
- adafruit_miniqr.mpy - QR creation library lets us add easy-to-scan 2D barcodes to the E-Ink display
- neopixel.mpy - This library is used to control the onboard NeoPixels.
- simpleio.mpy - This library is used for tone generation.
Secrets
Even if you aren't planning to go online with your MagTag, you'll need to have a secrets.py file in the root directory (top level) of your CIRCUITPY drive. If you do not intend to connect to wireless, it does not need to have valid data in it. Here's more info on the secrets.py file.
Text editor powered by tinymce.