Introduction

Documentation Status Discord Build Status Code Style: Black

CircuitPython board identification and information

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-board-toolkit

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-board-toolkit

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .env
source .env/bin/activate
pip3 install adafruit-board-toolkit

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Table of Contents

Simple test

Ensure your device works with this simple test.

examples/board_toolkit_simpletest.py
 1# SPDX-FileCopyrightText: Copyright (c) 2021 Dan Halbert for Adafruit Industries
 2#
 3# SPDX-License-Identifier: Unlicense
 4
 5import adafruit_board_toolkit.circuitpython_serial
 6
 7comports = adafruit_board_toolkit.circuitpython_serial.repl_comports()
 8if not comports:
 9    raise Exception("No CircuitPython boards found")
10
11# Print the device paths or names that connect to a REPL.
12print([comport.device for comport in comports])

adafruit_board_toolkit

CircuitPython board identification and information

  • Author(s): Dan Halbert for Adafruit Industries

adafruit_board_toolkit.circuitpython_serial.comports() Sequence[ListPortInfo]

Return all the comports recognized as being associated with a CircuitPython board.

adafruit_board_toolkit.circuitpython_serial.data_comports() Sequence[ListPortInfo]

Return all comports presenting a CircuitPython serial connection used for data transfer, not the REPL.

adafruit_board_toolkit.circuitpython_serial.repl_comports() Sequence[ListPortInfo]

Return all comports presenting a CircuitPython REPL.

Indices and tables