Quick Reference Guide - Adafruit Crickit with CPB¶
The Adafruit Crickit for Circuit Playground Bluefruit is a baseboard providing motor drivers and other useful
I/O. It communicates with the Bluefruit using the I2C bus. The various
interfaces can be accessed using the adafruit_crickit
library.
The following tables provide summary information of the variables and functions in the interface. These can be used in Python scripts and also tested from the serial command line (REPL).
The library must be accessed (imported) before the following fragments will work, either from scripts or at the serial command line (REPL). Please use the following instruction:
from adafruit_crickit import crickit
For specific code samples, please see Introductory Examples - Adafruit Crickit with CPB.
Actuator Drivers¶
Driver |
Attribute |
Values and Units |
---|---|---|
motor 1 |
|
bidirectional PWM, -1 to 1 |
motor 2 |
|
bidirectional PWM, -1 to 1 |
drive 1 |
|
unidirectional PWM, 0 to 1 |
drive 2 |
|
unidirectional PWM, 0 to 1 |
drive 3 |
|
unidirectional PWM, 0 to 1 |
drive 4 |
|
unidirectional PWM, 0 to 1 |
servo 1 |
|
angle in degrees, 0 to 180 |
servo 2 |
|
angle in degrees, 0 to 180 |
servo 3 |
|
angle in degrees, 0 to 180 |
servo 4 |
|
angle in degrees, 0 to 180 |
There are other options and attributes. For more details, please see the the library documentation.
Sensor Inputs¶
Sensor |
Attribute |
Values and Units |
---|---|---|
touch 1 |
|
True when touched, otherwise False, auto-calibrating |
touch 2 |
|
True when touched, otherwise False, auto-calibrating |
touch 3 |
|
True when touched, otherwise False, auto-calibrating |
touch 4 |
|
True when touched, otherwise False, auto-calibrating |
There are other options and attributes. For more details, please see the the library documentation.
The ‘signal’ pins are accessed using the crickit.seesaw
object, please see the Adafruit tutorial.