a1tD0000007eEArIAM

Course: Introduction to Programming with NAO
2. Sequences Series vs Parallel

  • 6-9 grade
  • Beginner

Lesson Description:

Lesson Description:
This lesson will teach how to make NAO speak using text to speech ability. It will cover the concept of series sequencing vs parallel sequencing by programming NAO to tell a story.

Objectives

  • Express speech as a series of segments
  • Order speech segments as sequential steps in a program
  • Chose the appropriate sequencing to connect the boxes (parallel or series)
  • Make NAO tell a story by connecting multiple animated say boxes.
  • Rename your boxes to give a meaningful name

image description

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:
Challenge_Problems2.jpg (569×283)

Who solved the maze correctly with the right sequence?
  • Alma
  • Terrence
  • None of them
  • Both of them

You Try!

Solve the maze, select the right answer.
  • 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

Make_NAO_Speak2_1.png (793×299)

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.

Which of these words can be used to describe series sequencing?
  • Then
  • After
  • At the same time
  • First

Parallel


lesson 2 image 3.png (264×277)




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


Which words can be used to describe parallel sequencing?
  • 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!

Who are the characters in your story?

What is the setting of your story?

What actions do the characters do in the 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.

Make_NAO_Speak2_1.png (793×299)


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!

lesson 2 image 2.png (534×193)

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.

Describe in your own words the difference between series and parallel sequencing

Why did we use series sequencing to create the story?