Lesson 15: Physical Outputs and LEDs
90 minutes
Overview
In this lesson, students learn how to attach external LEDs to their micro:bit and use code to light up these LEDs. This allows students to create more flexible devices that mimic real-world products. This lesson requires several external materials, as well as safety protocols to ensure students don’t accidentally damage their micro:bit.
Question of the Day: How can I use external LEDs to create physical prototypes?
Standards
AP - Algorithms & Programming
- 2-AP-11 - Create clearly named variables that represent different data types and perform operations on their values.
- 2-AP-19 - Document programs in order to make them easier to follow, test, and debug.
CS - Computing Systems
- 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.
IC - Impacts of Computing
- 2-IC-21 - Discuss issues of bias and accessibility in the design of existing technologies.
Agenda
Objectives
Students will be able to:
- Create and debug a circuit with an LED
- Create prototype devices that control an LED with code
Preparation
- Prepare circuit wiring materials, such as:
- Alligator clip wires
- LEDs
- Other conductive material (wire, paper clips, foil, etc)
- (optional) Buttons or switches
- 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
- Physical Outputs and LEDs - Slides
For the students
- External LEDs on a micro:bit - Resource
Vocabulary
- Circuit - A device that provides a path for an electric current to flow, often modifying that current. In computers, circuits allow for simple logical and mathematical operations using electricity.
- Prototype - A first or early model of a product that allows you to test assumptions before developing a final version.
Teaching Guide
Warm Up (5 minutes)
Prompt: If you could create any kind of computational device, what would it be? What would it do? How would people interact with it?
Share: After a few minutes of thinking time, have students share their ideas. Keep track of ideas at the front of the room.
Discussion Goal: Students will have a wide variety of ideas. As they share, emphasize the components of their ideas that involve the micro:bit or an app, which are two things we already know how to use. However, many student ideas will probably involve some sort of external component that’s disconnected from the rest of the micro:bit - for example, additional lights or buttons in different places on the device. Keep track of when students mention these types of components in their device.
Remarks
This is a great list of devices, and one thing I notice is how many of them involve needing something more than what the micro:bit offers. For the next few days, we’re going to learn how to connect external components to the micro:bit so we can prototype devices like this and add additional features. Today, we’ll learn how to add additional LEDs to our devices using wires and electricity.
Activity (80 minutes)
Transition: Send students to Code Studio
Guide to Programming Levels: Additional guidance for programming levels is provided in the Guide to Programming Levels. This document includes strategies and best-practices for facilitating programming levels with students.
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
Classroom Safety: This level is purposefully designed to provide an opportunity to discuss safety and best practices with handling the micro:bit. You may decide the emphasize these steps with the class as a full group, and monitor students as they complete these steps during this level. In general, students should always reset the app and unplug from the computer before making any wiring changes. Otherwise, it could ruin the LED or ruin the board.
Formative Assessment: This level can be used as a formative assessment. A rubric is provided in the level, and written feedback can be given to students. Click here to learn more about giving feedback to students.
Wrap Up (5 minutes)
Prompt: What’s a new type of device you can create now that you know how to wire up external LEDs that you wouldn’t have been able to create before this lesson?
Discussion Goal: Students should have a variety of answers - as students explain their answers, listen for the places where an external component is useful in the device. There is no single correct answer to this prompt - instead, encourage students to listen to the ideas of their peers to hear different types of devices others are thinking about. This can be helpful for the end of unit project when students need to come up with their own device to prototype and develop.
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.