< Creating Apps with Devices (micro:bit) ('23-'24)

Lesson 10: Project: Human Device Interaction

225 minutes

Overview

In this project, students create an app that controls the micro:bit so it interacts with the physical environment around it, similar to many smart phone apps that are used to control devices in a house or car or school. Students use physical materials to help design their physical device, then create an app that lets the user interact with the physical device or change settings.

CSTA K-12 Computer Science Standards (2017)
    • 2-AP-11 - Create clearly named variables that represent different data types and perform operations on their values.
    • 2-AP-13 - Decompose problems and subproblems into parts to facilitate the design, implementation, and review of programs.
    • 2-AP-15 - Seek and incorporate feedback from team members and users to refine a solution that meets user needs.
    • 2-AP-17 - Systematically test and refine programs using a range of test cases.
    • 2-AP-19 - Document programs in order to make them easier to follow, test, and debug.
    • 2-CS-01 - Recommend improvements to the design of computing devices, based on an analysis of how users interact with the devices.
    • 2-CS-02 - Design projects that combine hardware and software components to collect and exchange data.
    • 2-CS-03 - Systematically identify and fix problems with computing devices and their components.

Agenda

Objectives

Students will be able to:
  • Create a project that incorporates physical materials into its design
  • Create a project that uses a variety of inputs and outputs from the micro:bit and app screen

Preparation

  • Review the Project Guide and Rubric to understand the scope of the project.
  • Review the exemplar projects as examples of what students can create.
  • (Optional) You may decide to show one of these projects to students to help spark ideas.
  • Gather prototyping materials, such as:
    • Structural material (cardboard, construction paper, etc)
    • Connective material (tape, glue, hot glue, etc)
    • Construction tools (scissors, staplers, etc)
    • Other materials (cups, binder clips, paper plates, etc)
  • Check the "Teacher's Lounge" forum for verified teachers to find additional strategies or resources shared by fellow teachers

Links

Heads Up! Please make a copy of any documents you plan to share with students.

For the teachers

Vocabulary

  • Prototype - A first or early model of a product that allows you to test assumptions before developing a final version.

Teaching Guide

Day 1 (45 minutes)

Warm Up (5 minutes)

Prompt: What's an example of when someone has used an app to control a physical device of some kind? For example, using an app to automatically unlock or lock a car door.

Share Out: Have students discuss with their neighbors, then lead a full class discussion

Discussion Goal: Hopefully students will have a wide variety of experiences. Some examples might include:

  • Using an app to control a thermostat
  • Using an app to control a vacuum robot
  • Using an app to control a security camera
  • Using an app to turn on and off a light or change its color

Remarks

Today we're going to start a project where you will be building a prototype of a similar device. A prototype is an early version of a larger product that you make to perform tests and verify it works as expected. Our prototypes are like "early versions" of many of the devices mentioned during the discussion.

Teaching Tip

(Optional) Example App: The Example Apps for this project were all developed with the Circuit Playground, the original device used in this curriculum. The types of projects students can create are equivalent between these two devices. Even though it uses the Circuit Playground, you may decide to show one of the exemplar app videos as an example of what students can create. This can help spark ideas, and give students a model of what to work towards when making their own devices.

Vocabulary:

  • Prototype - A first or early model of a product that allows you to test assumptions before developing a final version.

Introduce the Project (15 minutes)

Distribute: (Optional) pass out copies of the project guide. Students will use this to plan their project, and includes items that can be used for assessment at the end of the project.

Slides: Present an overview of the project and the steps students will take to complete it.

Teaching Tip

Facilitating Group Projects: If students are working in pairs or small teams to complete projects, consider showing these two videos to the class:

Depending on your goals with this project, consider having teams complete a Student Guide to Team Planning, which reinforces the message in the video

Sketching Your Device (20 minutes)

Project Guide: Have students begin filling out the project guide, planning their app and sketching what their device will look like. Check in with students during this step to help brainstorm ideas and ensure students are completing the project guide correctly.

Distribute: As students finish their project guide, allow students to access the construction materials you've collected, such as paper and cardboard and any other supplies.

Teaching Tip

Scoping Student Projects: Students may ideate projects that are beyond the skills they currently have or that would take longer than the allotted time to implement. Rather than asking students to choose a different project, consider asking students to imagine a more scaled-down version of their initial idea. As an analogy, if students initial idea is the "Run" step, imagine a less intense version that represents what the "Walk" step would look like. If necessary, you can keep going back further to a "Crawl" step as well.

Digging Deeper: This is sometimes referred to as the Minimal Viable Product - you can learn more about this process and adapt it into your project strategies by reading this article: Making Sense of MVP by Henrik Kniberg

Wrap Up (5 minutes)

Collect: Collect Project Guides and look over them for any issues that could cause problems for students in the next portion of the lesson. Students may also use the time before the next lesson to brainstorm additional app ideas.

Day 2 (45 minutes)

Warm Up (5 minutes)

Distribute: Re-distribute the Project Guides from yesterday. If you have any feedback for students, make time to talk to them individually. Otherwise, students can jump straight into the next step for their project.

Teaching Tip

Storage Space: By the end of this lesson, students will have a variety of materials in different stages of completion. Be sure to plan ahead on how you would like students to store these items in your classroom so they can continue working across multiple days.

Build Your Device (30 minutes)

Distribute: Allow students to access the construction materials you've collected, such as paper and cardboard and any other supplies.

Students will spend most of the class period building their physical devices and testing how it will integrate with the micro:bit.

Wrap Up (10 minutes)

Collect: Provide a space for students to store their projects. You may want to provide extra time for students to organize their materials, store them safely, then clean up their workspace.

You can look over the devices and make any notes of students you may want to check in with tomorrow.

Day 3 (45 minutes)

Warm Up (5 minutes)

Distribute: Allow students to collect their devices again and begin working. Allow students to access the construction materials you've collected, such as paper and cardboard and any other supplies.

Complete Your Device (10 minutes)

Circulate: Check in with students as they begin finishing up their devices. As they get closer, they can transition to Code Studio and begin coding.

Teaching Tip

Helping Students Move On: Some students may struggle finding a good stopping point in their project - if left to their own devices, they would continue perfecting every last detail of their project and never get to the coding. If this happens, remind students that by definition a prototype is an early draft of the product, not the final product. Prototypes are designed to be slightly messy so they can be iterated on quickly, and they will never be perfect. Once they're built enough to test out the larger idea, students can move on to the coding stage.

Start Coding (25 minutes)

Transition: Send students to Code Studio to begin coding their devices.

Troubleshooting Devices: If student devices aren't able to connect, they can click the Help and Tips tab and then access the Maker Setup page (click the image to see more). This will let them re-reconnect their board to App Lab.

If students continue to have issues, refer to the Troubleshooting section of our Maker Support Article

Debugging Strategies: As students design and implement their own project ideas, they may find themselves with new bugs that they need to untangle and you may find yourself looking at completely unfamiliar code as students look for help troubleshooting their errors. To help smooth out the debugging experience, consider the following strategies:

  • Review the Teacher Guide to Debugging for some common questions and strategies to help support students in debugging their code
  • Have students follow the steps in the Student Guide to Debugging and use the Bug Report Quarter-Sheets as an initial step in the debugging process. This helps students prepare and communicate their issue before asking for help.
  • If students haven't seen it yet, consider showing the Debugging Video to the class to reinforce debugging best practices.

Digging Deeper: Consider supplying students with an object to talk to as part of the debugging process. This is sometimes known as Rubber Duck Debugging - you can learn more on the website https://rubberduckdebugging.com/

Wrap Up (5 minutes)

Collect: Provide a space for students to store their projects. You may want to provide extra time for students to organize their materials, store them safely, then clean up their workspace.

You can look over students code within Code Studio to see how much progress they are making and decide if there are any students worth checking in with tomorrow.

Day 4 (45 minutes)

Warm Up (5 minutes)

Distribute: Allow students to collect their devices again and begin working. You may decide to limit access to additional construction supplies, since students should be focusing on coding their devices at this point.

Coding and Testing (35 minutes)

Transition: Send students to Code Studio to continue coding their devices. They should be testing their devices and making changes to their prototype if necessary.

Wrap Up (5 minutes)

Collect: Provide a space for students to store their projects. You may want to provide extra time for students to organize their materials, store them safely, then clean up their workspace.

Teaching Tip

Demonstrations: Tomorrow's lesson provides space for students to celebrate and demonstrate their projects. We provide a few options for how this can look, but the format for these demonstrations is left open-ended for you to decide the best way for student to share their projects. Be sure to make a decision on how students will present their work, and consider any additional planning students may need to make before tomorrow in order to be successful.

Day 5 (45 minutes)

Warm Up

Distribute: Allow students to collect their devices again

Review Device (10 minutes)

Review: Students should ensure their devices work as expected in preparation for presenting their work to other students.

Demonstrations (30 minutes)

Provide space for students to demonstrate what they've built to other students. Some options include:

  • Gallery Walk: Allow students to circulate and interact with the devices each have built
  • Presentation Pitch: Have students opt-in to presenting their device as if they are pitching it to investors. Students could prepare additional materials such as a short slide deck
  • Digital Video Gallery: Have students record videos of themselves using the devices. Students may decide to construct their video like a commercial, emphasizing how the device can help solve a problem.

Wrap Up (5 minutes)

Collect: Have students submit their prototypes and submit their apps in App Lab.

Reflect: Have students complete a quick 5-question survey in Code Studio. You will be able to view the anonymized results in the teacher dashboard.

Creative Commons License (CC BY-NC-SA 4.0).

This work is available under a Creative Commons License (CC BY-NC-SA 4.0).

If you are interested in licensing Code.org materials for commercial purposes contact us.