Tue. Feb 16, 2021, 10:30AM to 12:20PM (Zoom)

Today’s class is primarily devoted to hands-on learning.

Warm-up

  1. Brief check-in.
  2. Any questions?

Administrative

  1. Did everyone successfully pick up a course kit (2 bags) from the campus store?
  2. Did everyone successfully pick up a Bluefruit microcontroller from Hunt A9?
  3. 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:

  1. What was your general scenario and approach?
  2. What was the hardest rule to interpret in actual performance?
  3. 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.

  1. touch-sensitive light demo
  2. mu editor
  3. editing/running code
  4. 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.

  1. connecting the board
  2. installing the firmware
  3. testing using mu ‘Serial’, the read-eval-print loop (REPL) window
    2+2
    3**201
    import time
    time.monotonic()
    help('modules')
  4. installing the libraries
  5. testing the library
    from adafruit_circuitplayground import cp
    cp.red_led = True
    cp.play_tone(440, 1.0)
  6. 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.

  1. editing code in place
  2. saving programs back to your computer
  3. exploring the Adafruit tutorials
  4. exploring the library documentation

Assignment

  1. Please install Python 3.8 on your computer with additional packages as per the course Python 3 Installation guide.
  2. 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.
  3. Post a very brief progress report (a sentence or two) to indicate what tutorials you tested and any problems that arose.