Copying Libraries to Your Board
First open the lib folder on your CIRCUITPY drive. Then, open the lib folder you
extracted from the downloaded zip. Inside you'll find a number of folders and .mpy
files. Find the library you'd like to use, and copy it to the lib folder on CIRCUITPY.
If the library is a directory with multiple .mpy files in it, be sure to copy the entire
folder to CIRCUITPY/lib.
This also applies to example files. Open the examples folder you extracted from the
downloaded zip, and copy the applicable file to your CIRCUITPY drive. Then, rename
it to code.py to run it.
Understanding Which Libraries to Install
You now know how to load libraries on to your CircuitPython-compatible
microcontroller board. You may now be wondering, how do you know which libraries
you need to install? Unfortunately, it's not always straightforward. Fortunately, there is
an obvious place to start, and a relatively simple way to figure out the rest. First up:
the best place to start.
When you look at most CircuitPython examples, you'll see they begin with one or
more import statements. These typically look like the following:
import library_or_module
If a library has multiple .mpy files contained in a folder, be sure to copy the entire
folder to CIRCUITPY/lib.
•
©Adafruit Industries Page 68 of 263