¿Eres Profesor?
Lesson Plan
Courses
- Grades 3-12
- 3rd grade – 12th 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 IF-THEN.
- Create a technological object (prototype) using a device.
- Identify relationships between technology and the surrounding world.
- Evaluate personal work and the work of others, both individually and in teams.
- Engage in discussions and reflect on improvement ideas.
Start (10 minutes)
Welcome the students to class and briefly introduce the day’s activity: “Today, we will learn how to prototype a motion-detecting camera.”
We will start the class by providing technical knowledge to the students for meaningful learning of the practical activity.
To kick off the class, we can begin with a question:
Have you heard of motion sensors?
You can allow the students to propose their answers and then complement them with the correct response.
Motion sensors are devices capable of detecting when someone or something moves near them and operate using different technologies. Today, we will see infrared sensors, ultrasonic sensors, and image-based sensors.
Some motion sensors work with infrared technology, which is a type of light that is invisible to the human eye. These sensors emit a small amount of infrared light and then detect the light reflected from nearby objects. If an object moves near the sensor, the amount of reflected infrared light changes, activating the sensor and indicating that something is moving.
Other motion sensors use ultrasonic technology, which consists of high-frequency sound waves that are inaudible to the human ear. These sensors emit sound waves and then detect the echoes bouncing off nearby objects. If an object moves near the sensor, the echo changes, activating the sensor and indicating that something is moving.
There are also other types of motion sensors, such as those based on cameras, which we will use in this activity.
Using a camera, changes in the image can be detected when something moves in front of it. For example, if someone moves in front of a smartphone’s camera, the captured image will change, indicating that something is moving.
In this activity, we will also learn about conditionals.
Have you heard about conditionals in programming?
You can allow the students to propose their answers and then complement them with the correct response.
It’s a way of instructing the computer to do different things depending on whether something is true or false.
For example, you can tell the computer that if it’s daytime, turn off the light (true), and if it’s not, turn it on (false).
So, how do we use a conditional to activate an alarm when motion is detected?
We can instruct the camera that if it detects motion, activate an alarm, and if it doesn’t detect motion, do not activate it.
To do this, we’ll first specify how much motion is considered activity by using a numerical value. If the amount of detected motion exceeds this pre-set numerical threshold, the condition is true, and the alarm is activated.
But how do we continuously check if something is moving?
With a main loop! We constantly repeat our condition. If you don’t remember what a loop is, you can review Activity 5.
Finally, to kickstart the prototyping process and make them feel like the protagonists of their learning, ask them:
Do you want to learn how to prototype a motion detector?
Development (20-30 minutes)
We connect our equipment to the Protobject platform. For this exercise, we will use the ENVIRONMENTAL MOTION motion sensor and the AUDIO PLAYER lamp.
Remember to experiment on your own beforehand before asking the students to experiment with Protobject. This way, you can anticipate questions that may arise from the students.
First, we use the IF/DO block, which allows us to assign the condition and the action to be executed.
We state that if the detected motion is greater than 40, then a song, which is a YouTube link, should be activated.
Finally, we encapsulate everything within a main loop to continually repeat this condition.
To test the prototype, we instruct the students to click the activation button.
Congratulations!
Closure (5-10 minutes)
Now that you have prototyped a motion sensor with Protobject, challenge the students with a question:
- What would happen if the motion occurs at night?
Note that the camera’s image detector only works when the image is altered, unlike infrared or ultrasonic sensors.
- So, how reliable is this camera?