¿Eres Profesor?
Lesson Plan
Courses
- Grades 6-12
- 6th grade – 12th grade courses
Materials
- Cell phone, tablet, or computer
- Internet connection
Description
In this activity, students can experiment with Protobject, learning visual programming and computer science safely and playfully with a device.
Educational Objectives
- Understand the concept of functions.
- Create a technological object (prototype) using a device.
- Identify relationships between technology and the surrounding world.
- Evaluate personal and others’ work individually or in teams.
- Discuss and reflect on ideas for improvement.
Beginning (10 minutes)
Welcome students to the class and briefly introduce the day’s activity: “Today we will learn how to prototype a light switch panel.”
We will start the class by providing students with technical knowledge for meaningful learning of the practical activity.
To begin the lesson, we can start with a question:
Do you know what functions are in programming?
Functions are groups of code that you can reuse whenever you need them in your algorithm.
We can categorize them as functions without parameters or with parameters. For example, if we have a recipe for cooking dinner with five steps, every time we want to cook dinner, we would have to write those five steps.
With functions without parameters, we can give those five steps a name and use them whenever we need them.
Functions with parameters, on the other hand, accept input data to perform the actions we have programmed. It’s like completing a sentence; you are given certain parts of a sentence but leave some parts blank, which will be filled in by the parameters.
Functions with parameters
Functions with parameters accept input data to perform the actions we have programmed. It’s like completing a sentence; you are given certain parts of a sentence but leave some parts blank, which will be filled in by the parameters.
To explain it better, we could create a light sequence and name it as a function, then tell it in which color we want that function to be executed. The color would be the parameter, and it would follow the same steps but change the color based on the parameter.
Finally, to start the prototyping process and make them feel like protagonists of their learning, ask them:
Shall we prototype a light switch panel?
Development (20-30 minutes)
We connect our devices to the Protobject platform. For this exercise, we will use the TOUCH BUTTON and the LAMP.
Remember to experiment on your own beforehand before asking students to experiment with Protobject so that you can anticipate questions that may arise.
You can follow the activity’s code step by step, and if you have any questions, read the commented code.
To test the prototype, we will instruct the students to click the activation button.
Congratulations!
Closure (5-10 minutes)
Now that you have programmed a noise sensor:
Try modifying values! How do we change the colors?
How do we change the speed of the light pattern?
And if we wanted to create more light patterns?
Challenge: Modify the project to display a message on the screen that says “Go” in green or “Stop” in red.
Hint: Add the component DibujarEscribir to write on the screen. Then, to write the message, define a new function with parameters for the text and color to handle writing the message on the screen.
Check out the challenge solution.