Lesson 13: Accelerometer
45 minutes
Overview
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.
Purpose
This lesson gives students an opportunity to work with the accelerometer sensor and explore its orientation properties and accelerometer-specific board events. Students will see the purpose and uses of an accelerometer in real world devices and programs and create their own versions of some of these applications. To do this, students will need to refer back to their past knowledge of the counter pattern to create functional accelerometer-based apps.
Assessment Opportunities
-
Recognize the use and need for accelerometer orientation (pitch and roll).
Wrap Up: Students should mention several real world applications for the accelerometer.
-
Use the data event to continually update an element's properties.
Code Studio: see rubric on bubble 7.
Agenda
Objectives
Students will be able to:
- Recognize the use and need for accelerometer orientation (pitch and roll).
- Use the data event to continually update an element's properties.
Links
Heads Up! Please make a copy of any documents you plan to share with students.
For the teachers
- Accelerometer Events - Resource
- CSD Unit 6 - Physical Computing - Slides
- The Accelerometer - Resource
Introduced Code
Teaching Guide
Warm Up (5 minutes)
What Makes a Sensor?
Prompt: Refer back to the analog sensors, what makes a sensor a sensor? Could an accelerometer be a sensor?
Students have been exposed to sensors in previous lessons but have only seen a few aspects of what a sensor can measure. This discussion gives students a chance to think about the characteristics of a sensor, while also thinking about the other possible characteristics of a sensor they haven’t been exposed to.
Share: Have students share their thoughts and ideas in small groups.
Activity (35 minutes)
The Accelerometer
Transition: Send students to Code Studio.
Level 7: You can use this level as a formative assessment for students. Click inside the level to view a rubric and leave feedback to your students
Wrap Up (5 minutes)
Journal
Prompt: What are some uses for pitch and roll in an everyday app?
Students should think of several applications for the accelerometer, explaining how knowing the pitch and roll could be useful.
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.