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

crickit.dc_motor_1.throttle

bidirectional PWM, -1 to 1

motor 2

crickit.dc_motor_2.throttle

bidirectional PWM, -1 to 1

drive 1

crickit.drive_1.fraction

unidirectional PWM, 0 to 1

drive 2

crickit.drive_2.fraction

unidirectional PWM, 0 to 1

drive 3

crickit.drive_3.fraction

unidirectional PWM, 0 to 1

drive 4

crickit.drive_4.fraction

unidirectional PWM, 0 to 1

servo 1

crickit.servo_1.angle

angle in degrees, 0 to 180

servo 2

crickit.servo_2.angle

angle in degrees, 0 to 180

servo 3

crickit.servo_3.angle

angle in degrees, 0 to 180

servo 4

crickit.servo_4.angle

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

crickit.touch_1.value

True when touched, otherwise False, auto-calibrating

touch 2

crickit.touch_2.value

True when touched, otherwise False, auto-calibrating

touch 3

crickit.touch_3.value

True when touched, otherwise False, auto-calibrating

touch 4

crickit.touch_4.value

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.