Feb 24, 2022, 12:20PM to 2:10PM
Welcome! The main objectives for today are to introduce the Adafruit Circuit Playground Bluefruit microcontroller and CircuitPython programming. You will work in pairs for this learning activity today.
You will need a laptop for today (one per pair). Please try to install the free mu editor (or equivalent tools) in advance for working with CircuitPython microcontrollers.
Next class we have a fantastic visiting speaker – Chico MacMurtrie – you are welcome to invite a friend to the talk at 1pm on Tues., Mar. 1.
- Tuesday: visiting speaker (in-class, but remote presenter )
- Thursday: costume integration, improvisatory kinetic sculpture
- (Spring Break.)
- (Start project, with interspersed topical workshops.)
Materials for Today
- Bluefruit installed on Crickit
- 5V 3A power adapter
- micro-USB cable for your laptop
- your personal laptop
- DC motor pump
- micro hobby servo
- small flat screwdriver
Circuit Playground Bluefruit Microcontroller
The motorized elements of our kinetic creations will be controlled using a wearable microcontroller to measure sensors, operate actuators, and perform scripted actions. Today’s objective is to help you get started with the tools.
We will generally be following the hardware notes and sample code from the course technical guide. But we’ll go step by step at a novice level so no one gets left behind.
The link to the guide can always be found under SOFTWARE AND MECHANISM RESOURCES in the left-hand navigation bar of the course website.
If you have not already installed the mu Python editor, please also download that now and run the installer.
We first want to give you a quick preview of the end goal for the day.
- touch-sensitive light demo
- mu editor
- editing/running code
- interacting directly with the Python system
- attaching a motor pump to the Crickit
- attaching a hobby servo to the Crickit
Setting Up Your Hardware
- connecting the board
- testing using mu ‘Serial’, the read-eval-print loop (REPL) window
- testing the library
from adafruit_circuitplayground import cp
cp.red_led = True
- trying out sample code
The Crickit baseboard include motor drivers, hobby servo ports, and additional capacitive touch sensors.
- Connecting a motor and running the sample code
- Connecting a hobby servo and running the sample code.
CircuitPython lets you treat the microcontroller like a tiny data drive. Your code can be edited in-place, and saving will run it. But you’ll need to work out a plan for copying final programs back to your computer for your documentation.
- editing code in place
- saving programs back to your computer
- exploring the Adafruit tutorials
- exploring the library documentation