Tue. Feb 16, 2021, 10:30AM to 12:20PM (Zoom)
Today’s class is primarily devoted to hands-on learning.
Warm-up
- Brief check-in.
- Any questions?
Administrative
- Did everyone successfully pick up a course kit (2 bags) from the campus store?
- Did everyone successfully pick up a Bluefruit microcontroller from Hunt A9?
- Did anyone install the mu Python editor software?
Assignment 4 Review
Let’s take about twenty minutes to discuss your results from Assignment 4. Each group can briefly tell us:
- What was your general scenario and approach?
- What was the hardest rule to interpret in actual performance?
- What was the most surprising feedback from the audience?
Circuit Playground Bluefruit
The communication with our kinetic creations will be mediated using a wearable microcontroller to measure sensors, operate actuators, and communicate with a laptop using either wired USB or wireless Bluetooth. Today’s objective is to help you get started with the tools.
We will generally be following the hardware notes from the course technical guide: Adafruit Circuit Playground Bluefruit. But we’ll go step by step at a novice level so no one gets left behind.
Downloads
We have cached copies of the installer files we will be using in a Google Drive folder KF-S21-CPB-Downloads. Please take a moment to copy those to your computer.
If you have not already installed the mu Python editor, please also download that now and run the installer.
Live Demo
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
Setting Up Your Hardware
The Circuit Playground Bluefruit will need to have the CircuitPython system installed before we can program it. We will only need to do this once.
- connecting the board
- installing the firmware
- testing using mu ‘Serial’, the read-eval-print loop (REPL) window
2+2
3**201
import time
time.monotonic()
help('modules')
- installing the libraries
- testing the library
from adafruit_circuitplayground import cp
cp.red_led = True
cp.play_tone(440, 1.0)
- trying out sample code
Next Steps
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
Assignment
- Please install Python 3.8 on your computer with additional packages as per the course Python 3 Installation guide.
- Spend an hour going through the Adafruit tutorial starting with Red LED. Please go at your own pace and feel free to skip around. The objective is become more comfortable with the board and basic CircuitPython.
- Post a very brief progress report (a sentence or two) to indicate what tutorials you tested and any problems that arose.
Leave a Reply
You must be logged in to post a comment.