Unit6

Unit 6 - Physical Computing

In the Physical Computing unit, students further develop their programming skills, while exploring more deeply the role of hardware platforms in computing. Harkening back to the Input/Storage/Processing/Output model for a computer, students look towards modern “smart” devices to understand the ways in which non-traditional computing platforms take input and provide output in ways that couldn't be done with the traditional keyboard, mouse, and monitor.

Using App Lab and Adafruit’s Circuit Playground, students develop programs that utilize the same hardware inputs and outputs that we see in many modern smart devices, and they get to see how a simple rough prototype can lead to a finished product. The unit concludes with a design challenge that asks students to use the Circuit Playground as the basis for an innovation of their own design.

Chapter 1: Programming with Hardware

Big Questions

  • How does software interact with hardware?
  • How can computers sense and respond to their environment?
  • What kind of information can be communicated with simple hardware outputs?

Week 1

Lesson 1: Innovations in Computing

Research | Unplugged

  • Warm Up (10 min)
  • Activity (45 min)
  • Wrap Up (2 min)
  • Extensions

Explore a wide variety of new and innovative computing platforms while expanding your understanding of what a computer can be.

Student Links: Activity Guide | Video | Video

Lesson 2: Designing Screens with Code

App Lab

  • Warm Up (5 min)
  • Activity (45 to 60 minutes)
  • Wrap Up (5 min)

By reading and changing the content on the screen of an app, the class starts to build apps that only need a single screen. Even with just one screen, these techniques allow for lots of user interaction and functionality.

Lesson 3: The Circuit Playground

App Lab | Maker Toolkit

  • Warm Up (5 min)
  • Activity (45)
  • Wrap Up (5 min)

Get to know the Circuit Playground, the circuit board that will be used throughout the rest of this unit. Using App Lab, develop programs that use the Circuit Playground for output.

Week 2

Lesson 4: Input Unplugged

Unplugged

  • Warm Up (10 min)
  • Activity (40 min)
  • Wrap Up (2 min)

Experience two different ways that an app can take input from a user, while learning more about the event-driven programming model used in App Lab.

Student Links: Activity Guide

Lesson 5: Board Events

App Lab | Maker Toolkit

  • Warm Up (5 min)
  • Activity (45 min)
  • Wrap Up (2 min)

Using the hardware buttons and switch, the class develops programs that use the Circuit Playground as an input.

Lesson 6: Getting Properties

App Lab | Maker Toolkit

  • Warm Up (5 min)
  • Activity (40 min)
  • Wrap Up (10 min)

This lesson introduces students to the getProperty block, which allows them to access the properties of different elements with code. Students first practice using the block to determine what the user has input in various user interface elements. Students later use getProperty and setProperty together with the counter pattern to make elements move across the screen. A new screen element, the slider, and a new event trigger, onChange, are also introduced.

Lesson 7: Analog Input

App Lab | Maker Toolkit

  • Warm Up (10 min)
  • Activity (40 min)
  • Wrap Up (5 min)

Explore the analog inputs on the Circuit Playground, writing programs that respond to the environment through sensors.

Student Links: Video

Week 3

Lesson 8: The Program Design Process

App Lab | Maker Toolkit

  • Warm Up (15 min)
  • Activity (45-60 min)
  • Wrap Up (20 min)

This lesson introduces students to the process they will use to design programs of their own throughout this unit. This process is centered around a project guide which asks students to sketch out their screens, identify elements of the Circuit Playground to be used, define variables, and describe events before they begin programming. This process is similar to the Game Design Process that we used in Unit 3. In this lesson students begin by playing a tug o' war style game where the code is hidden. They discuss what they think the board components, events, and variables would need to be to make the program. They are then given a completed project guide which shows one way to implement the project. Students are then walked through this process through a series of levels. At the end of the lesson students have an opportunity to make improvements to the program to make it their own.

Student Links: Project Guide

Lesson 9: Project: Make a Game

App Lab | Maker Toolkit | Project

  • Warm Up (10 min)
  • Activity (90 - 120 min)
  • Wrap Up (10 min)

Students take what they've learned through chapter one, and develop an app of their own design that uses the board to output information.

Student Links: Project Guide | Rubric

Chapter Commentary

This unit begins with an activity that encourages students to explore a wide variety of non-traditional computing platforms, before kicking off a review of programming in App Lab, with a particular focus on better understanding the event-driven programming model that was first introduced in Unit 4. Students learn techniques to make the apps they write more flexible by modifying design elements through code instead of always relying on design mode. Using the Circuit Playground, they then explore different approaches to taking input and producing output using hardware. By the end of this chapter, students will design a develop a game that uses physical hardware for input and output.


Chapter 2: Building Physical Prototypes

Big Questions

  • How do programmers work with larger amounts of similar values?
  • How can complex real-world information be represented in code?
  • How can simple hardware be used to develop innovative new products?

Week 4

Lesson 10: Arrays and Color LEDs

App Lab | Maker Toolkit

  • Warm Up (5 min)
  • Activity (45 min)
  • Wrap Up (5 min)

Learn how lists can be used to store multiple values in a single variable name.

Lesson 11: Making Music

App Lab | Maker Toolkit

  • Warm-Up (5 min)
  • Activity
  • Wrap-Up (5 min)

In this lesson students will use the buzzer to its full extent by producing sounds, notes, and songs with the buzzer. Students start with a short review of the buzzer's frequency and duration parameters, then move on to the concept of notes. Notes allow students to constrain themselves to frequencies that are used in Western music and provide a layer of abstraction that helps them to understand which frequencies might sound good together. Once students are able to play notes on the buzzer, they use arrays to hold and play sequences of notes, forming simple songs.

Lesson 12: Arrays and For Loops

App Lab | Maker Toolkit

  • Warm Up (5 min)
  • Activity (40 min)
  • Wrap Up

Combining lists and for loops allows you to write code that impacts every element of a list, regardless of how long it is. The class uses this structure to write programs that process all of the elements in lists, include the list of color LEDs.

Lesson 13: Accelerometer

App Lab | Maker Toolkit

  • Warm Up (5 Min)
  • Activity
  • Wrap Up (5 Min)

In this lesson, students will explore the accelerometer and its capabilities. They’ll become familiar with its events and properties, as well as create multiple programs utilizing the accelerometer similar to those they’ve likely come across in real world applications.

Week 5

Lesson 14: Functions with Parameters

App Lab | Maker Toolkit

  • Warm Up
  • Activity
  • Wrap Up

The lesson starts with a quick review of parameters, in the context of App Lab blocks that they students have seen recently. Students then look at examples of parameters within user-created functions in App Lab and create and call functions with parameters for themselves, using them to control multiple elements on a screen. Afterwards, students use for loops to iterate over an array, passing each element into a function. Last, students use what they have learned to create a star catching game.

Lesson 15: Circuits and Physical Prototypes

App Lab | Maker Toolkit

  • Warm Up (5 min)
  • Activity 1 (30 min)
  • Activity 2 (30-45 min)
  • Activity 3 (30-45 min)
  • Wrap Up (15 min)

Wire simple circuits to create a physical prototype using cheap and easily found materials.

Student Links: Video | Project Guide

Week 6

Lesson 16: Project: Prototype an Innovation

App Lab | Maker Toolkit | Project

  • Warm Up (10 min)
  • Activity (80-200 min)
  • Wrap Up (30-60 min)
  • Extensions

Develop innovative computing devices of your own design, using everything you've learned throughout this course.

Student Links: Project Guide | Peer Review | Rubric

Chapter Commentary

With an understanding of how to use hardware to take input and produce output, students move to thinking about more complex programs that integrate hardware and software. Using the color LEDs as an example of a a group of like objects, students learn how to use arrays to keep track of lists of values. From there we introduce the for loop, first simply as a way to repeat a block of code, and then as a way to run code on each element of an array. By the end of this chapter students will have explored all components of their boards while learning to structure their code using arrays, loops, and parametric functions. In the final two lessons students have an opportunity to dig into building physical prototypes using their boards.