Module 3: Physical Computing

Using the micro:bit from BBC, we will explore the basics of bringing computation to the physical world. The micro:bit can be programmed with Python. We give an overview of the basic components of the micro:bit, and how to control them with code. You will create a digital artifact that interfaces with the physical world. Here we pay particular attention to the importance of documentation.

Reference material for the microbit

Online editor for microbit

Project 3: Physical+Digital Art

Your goal is to create an interactive visualization that users can interact with using the microbit as a controller. You will be interfacing your microbit with Processing in Python mode. Use serial communication to send information from the microbit to the Processing running on your laptop. This is again an open-ended assignment.

You should utilize at least two different sensors on the micro:bit (e.g. accelerometer and buttons) to send serial information. Your Processing sketch should make use of these sensor values in a way that is central to the piece you are creating.

You may reuse your code from Project 1 as a starting point. You may even use a peer’s code (with their permission) as a starting point. However, note that you will only be graded on the delta between the starting point and the new submission. That is, the bar for overall quality is significantly higher if you are reusing code. If you are reusing code, you must clearly indicate as such in both the code itself (as a comment) and your artist’s statement on the video you post. Mention in that comment explicitly what improvements have been made since the prior submission. Failure to do so will be considered academic dishonesty.

What to hand in?

How am I graded?

Rubric

NOTE Because this is the last assignment of the semester, NO late submissions will be accepted (we need to get grades in very shortly after the assignment deadline). Failure to turn this assignment in on time will result in a zero grade.

An example of an A+ project is here: microbit code, Processing code. The video for this project is below:


Lecture 5:

Dec 3

Download slides for Lecture 5

We give a basic overview of IoT, physical computing, the maker movement, etc. How much background do you really need to build your own hardware device? What are the various ways you can approach this? What is the motivation for embedded systems, when should we just use a mobile phone? How do we connect devices together?

Lab 6: MicroBit setup

Dec 4

The goal of this lab is to setup our microbit and ensure all the hardware is functioning properly.

Download the code for the microbit here. Load this code in the online microbit editor.

Download the code for Processing here. Load this code into Processing. If you cannot open the file directly, open the file in a text editor and copy and paste the contents into a new processing sketch.

First, flash the code to the microbit. The microbit code will be sending serial messages to you computer. If you do not first flash the microbit, the processing code will not have any messages to read. You will know the code has flashed correctly when you see a flashing X on the microbit LED board.

With the micro:bit plugged in and running, run the Processing script. You may need to experiment with the portIndex to find the right value. On Windows computer, the correct portIndex will correspond to something like COM6. On a Mac it will correspond to something like /dev/cu.usbmodem14402. The number of ports available will depend on your particular devices and the USB and bluetooth devices you have connected to.

When you have selected the correct port, the processing terminal window will display the message face up over and over (or face down depending on the orientation of your microbit). Tilt your microbit to the side to generate the left message and watch the sphere in processing move.

Be careful - not all microusb cables can carry data - some are only power. If your computer does not recognize a device plugged in, you may need a different microusb cable.

Note: you need a USB port to connect the USB cable. If you have a Mac with only USB C ports, you will need an adapter or a different cable.

Make a short video that includes both the visualization and the microbit, and submit this for the lab.


Lecture 6:

Dec 10

Download slides for Lecture 6

What is Digital Art in Place, and Place in Digital Art? We explore issues of presentation of digital artifacts and how this can interface with strangers. We ask: Where will this be displayed? What is the context in which it appears? What type of viewers consume this?

Lab 7: Project 3 Help

Dec 11