Lesson Modules
Teaching Tips:
This lesson introduces two key programming concepts: series sequencing and parallel sequencing.
A program is a sequence of action that a computer executes. These actions can be sequenced in two ways:
1. Series which means the sequence are executed one after the other in order.
To illustrate the concept the following example can be given in real life the following actions are performed n series: I get up , then go and brush my teeth, then eat breakfast.
2. Parallel which means that the program will execute two sequences at the same time.
While I walk toward the bathroom I listen to the radio.
The difference can be shown with the use of words " Then" or " while".
The activity will have students use sequencing in series to make the NAO speak and tell a story. The story will be presented as a sequence of pieces of the story. Each piece is an animated say box that tells a part of the story.
An example of the code for this can be downloaded here. This is a similar code that the students will have to program.
For this module, you only to introduce the concept and play with the idea of sequencing actions with the Maze presented. The Maze is also in the CLASS VIEW section for everyone to look at it while answering the question.
Solution to the maze activity:
The following are a set of instructions for NAO to get to the red balloon:
- Alma
- Terrence
- None of them
- Both of them
You Try!
- Forward 2/ Right/ Forward 2/ Right/ Forward 2/ Right
- Right/ Left/ Forward 2/ Right/ Forward 2/ Right
- Forward 2/ Right/ Forward 1/ Left/ Forward 2/ Right/ Forward 1/ Left/ Forward 2/ Right/ Forward 1
- Forward 2/ Right/ Forward 2/ Right/ Forward 1/ Left
Teaching Tips:
This module dives more into the differences between parallel and series.
Here are some of the keywords that describe the different sequencing :
Sequencing in series: First, next, then, after, after that, soon, soon after, last, finally, before, later, in the end, second.
Sequencing in parallel: During, while, at the same time.
In Choregraphe:
Two or more boxes which inputs are connected to the same source are executed in parallel.
Boxes that are connected one after the other one source for one input are connected in series.
Sequencing refers to the order in which a program happens. Sequencing is the process of putting events, ideas and objects in a logical order.
There are two main types of sequencing a program. In series and in parallel.
Series
Programs written in series have actions that happen one after another. In Choregraphe, this looks like the picture above.
Each box happens one after the other.
- Then
- After
- At the same time
- First
Parallel
Programs written with actions in parallel have multiple actions that happen at the same time.
In Choregraphe that looks like the picture above. Be careful not to have two conflicting actions happening at
the same time! Nao cannot say “hello” and “how are you” at the same time. These boxes must be in series.
Note: In Choregraphe, the order is determined by how the boxes are connected, not by how they are arranged in the workspace
- Next
- While
- Last
- At the same time
Teaching Tips:
The code example is found in the Observe module. You can play it for your students and have them discuss the elements of the story said by NAO.
It's an inspiration for them for when they create their own story.
We're going to apply the concept of sequencing in series to make the NAO robot tell a story.
A story can have the following elements to it:
- Characters - the people/animals/creatures the story is about
- Setting - where and when the story happens
- Action- what do the characters do in your story.
Listen to the story by NAO and discuss the following with your classmates
- Who are the characters in this story?
- Where and when does it happen?
- What is the problem being addressed in the story?
Let's start coding our own story!
Drag out two or more animated say boxes. Each box for a different part in your story.
NAO V4-V5 | NAO V6 |
---|---|
In order to change what NAO says, double click the box. | In order to change what NAO says, click the tool at the bottom, and change the text in the "Text" box. |
Connect all the boxes in a logical order to tell your story.
Renaming Boxes
Your programs can start getting confusing with all those Animated Say boxes. To reduce confusion, rename your box by right-clicking the box and selecting Edit Box from the pop-up menu.
Change the box name in the Name field. Now your box has a new name!
Test your code on the virtual robot
Save your project
Teaching Tips:
AFTER CLASS
Store Student Files
Put the student files on a thumb drive or store them in some way so that the students can continue working on their project in the next lesson.
Pack Up Hardware
Pack the robots and computers according to the packing instructions.