Adafruit ESP32-S3 Manual page 69

Tft feather
Table of Contents

Advertisement

However,
import
from library_or_module import name
from library_or_module.subpackage import name
from library_or_module import name as local_name
They can also have more complicated formats, such as including a
block, etc.
The important thing to know is that an
name of the module or library that you're importing.
Therefore, the best place to start is by reading through the
Here is an example import list for you to work with in this section. There is no setup or
other code shown here, as the purpose of this section involves only the import list.
import time
import board
import neopixel
import adafruit_lis3dh
import usb_hid
from adafruit_hid.consumer_control import ConsumerControl
from adafruit_hid.consumer_control_code import ConsumerControlCode
Keep in mind, not all imported items are libraries. Some of them are almost always
built-in CircuitPython modules. How do you know the difference? Time to visit the
REPL.
In the
Interacting with the REPL
help("modules")
built-in modules available in CircuitPython for your board. So, if you connect to the
serial console on your board, and enter the REPL, you can run
see what modules are available for your board. Then, as you read through the
statements, you can, for the purposes of figuring out which libraries to load, ignore
t
the statement that import modules.
The following is the list of modules built into CircuitPython for the Feather RP2040.
Your list may look similar or be anything down to a significant subset of this list for
smaller boards.
©Adafruit Industries
statements can also sometimes look like the following:
section ()
command is discussed. This command provides a list of all of the
statement will always include the
import
on
The REPL
page ()
/
try
except
statements.
import
in this guide, the
help("modules")
impor
Page 69 of 263
to

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S3 and is the answer not in the manual?

Table of Contents

Save PDF