Are you a teacher?
Lesson Plan
Courses
- Grades 3-12
- 3rd Grade – 8th Grade Courses
Materials
- Cell phone, tablet, or computer
- Internet connection
Description
In this activity, students can experiment in an introductory way with Protobject, learning visual programming and computer science safely and playfully using a device.
Educational Objectives
- Understand the concepts of “else if” (elif) and the “Cartesian plane”
- Create a technological object (prototype) using a device
- Identify relationships between technology and the surrounding world
- Evaluate personal and others’ work in individual or team tasks
- Engage in dialogue and reflection on ideas for improvement
Introduction (10 minutes)
Welcome the students to the class and briefly introduce the day’s activity: “Today, we will learn to prototype a ‘fall detector’.”
We will start by providing technical knowledge to the students for meaningful learning of the practical activity.
To begin, we can ask a question:
Do you remember what a conditional statement in programming is?
You can give the students a chance to offer their answers and then provide the correct response.
It’s a way to tell the computer to do different things based on whether a statement is true or false.
For example, you can tell the computer to turn off the light if it’s daytime, otherwise, turn it on.
If you have doubts, you can review conditional statements “if/else” in Activity 9.
What would happen if we wanted to add more than two options?
Allow time for exploration and student responses. Then, supplement with the following:
The “else if” (elif) structure is a way to add more options to a decision being made in the “if/else” structure. You can think of it as choosing between different paths.
For example, imagine you have to feed your dog and that depending on the time of day, it will either receive breakfast, lunch, or dinner.
- IF it’s before 9:00 AM, THEN you have to give it breakfast.
- ELSE IF it’s between 9:00 AM and 6:00 PM, THEN you have to give it lunch.
- ELSE at another time, THEN you have to give it dinner.
“Else if” is used to choose between different options based on different conditions. If one condition is true, the computer will do one thing; if another condition is true, the computer will do something different. And so on, following the order in which you programmed it (sequence).
Finally, to initiate the prototyping process and make them feel like protagonists of their learning, ask them:
Do you want to learn how to prototype a fall detector?
Before you begin prototyping, you can review supplementary content:
The Cartesian plane is a way to represent different positions in a two-dimensional space using two perpendicular lines that intersect at a point. These lines are called axes and are labeled with the letters X and Y.
You may have seen it used to represent two different variables on a graph, and today, we will use it to represent up-and-down movement, which is along the Y-axis.
Development (20-30 minutes)
Connect our devices to the Protobject platform. For this exercise, we will use the motion sensor SMARTPHONEMOTION and the lamp LAMP.
Remember to experiment on your own beforehand so that you can anticipate questions that may arise from the students.
First, we will program our monitor to respond by turning on the green light if the movement on the Y-axis is less than 6.
We will repeat the same steps to turn on the yellow light for movement less than 20 and the orange light for movement less than 40. Finally, we will use an “else if” to turn on the red light if none of the other conditions are met.
Finally, we will place everything inside a loop so that the condition repeats indefinitely.
To test the prototype, instruct the students to click on the activation button.
Congratulations!
Closing (5-10 minutes)
Now that you have prototyped a fall detector with Protobject, challenge the students with a question:
- What would happen if we changed the axis from Y to X?
To solve the problem posed at the end of the activity, all you need to do is use the orientation value in the component’s intensity block. However, be sure to use the absolute value; otherwise, you might set negative values, which wouldn’t make sense.
Check the challenge solution.