1) Show the students’ goals on the class view.
2) Show the next section of the class view which lets the students know they are going to be on level 4 in Ozoblockly for today's lesson.
3) Build and Track Results Acvitiy
a) Open Ozoblockly
b) Choose level 4
c) Build the following program
d) Just like the students did in the observation activity - run Ozobot and track where it ends.
e) Change one of the numbers (left OR right)
f) Load the program onto the Ozobot
g) Run Ozobot on the test track
h) Trace where Ozobot stopped and write the left and right wheel speeds on the test track
i) Ask the students: Through this experiment what did we discover?
j) Then ask students what we should change next.
k) Continue doing this one or two more times.
4) Show the next section on the class view which has their 1st goal (Create a program that off-sets the robot’s drift from a straight line) and instructs them to track their experiments until their Ozobot goes straight. If a group has an Ozobot that travels in a straight line – have them work with another group.
5) Give students time to change their code, test, record, and repeat until Ozobot moves in a straight line.
6) Show the next section on the class view and let students know that the next few activities will help them understand how to use functions.
7) Play the next video on the class view. Have students follow the directions of the song and dance the Cha-Cha Slide.
8) Show the next section of the class view to the students (Cha-Cha slide dance steps) and discuss “Do you think a programmer wants to create a program for a robot to follow all of the following 70 dance steps?”
9) Show the next section of the class view. Give each student/group a copy of the Cha-Cha Slide Dance Steps . Do the 1st part together.
Example on how to start:
10) Open Ozoblockly and build the following program.
|A) keep your code from the 1st goal|
|B) In the left hand toolbox click functions|
|c) Click and drag the 1st function block “to do something” to the workspace|
|d) Change the name “do something” to “Move in a straight line”|
|e) Move your code into the “Move in a straight line” block|
|f) In the left hand toolbox click functions|
|g) You will not see a small function block titled “Move in a straight line”, click and drag the block onto the work space|
|h) Move blocks to match the following program|
|i) Run the program|
11) Show the students the question on the class view and facilitate a class discussion. What do you think the benefit is of using functions?
Possible Answers: Makes your code shorter and more organized, it can make your code easier to understand
12) Show the next section on the class view, have students create a function for Ozobot moving in a straight line.
13) Show the next section on the class view, discuss ...
How many steps are there in the Cha-Cha Slide? (Answer: 70)
How many functions would a programmer make for this dance?
Ex: cha-cha, step left, …
In this section we will focus on the purpose of using functions in our programs.