Lesson Plan Activity for Myro Robotics:
by: Christopher Michaud and Joe Finkelstein

Objectives:

Define Functions in Python
Use Functions to create movement routine
Use Iteration to repeat tasks or commands
Identify Syntax rules in Python:
Colons (:)
Tabs

Standards:

BCS-BP-5:
Students will design algorithms and programming solutions for a variety of computational problems.
BCS-BP-6: Students will design solutions for simple programs using basic programming techniques and constructs.
BCS-BP-7: Students will use and develop algorithms to solve simple problems.

Prior Knowledge:

Students will know how to start IDLE environment and initialize communication with  the Scribbler Robot.
Students will have a music selection as an .mp3 file available on thumb drive or in their file area.

Equipment:

1 Computer with IDLE installed for every 2 students
1 Scribbler Robot with Fluke Board for every 2 students
Students work in Pairs.

Vocabulary of Code for Activity:

 forward(1,1) forward Power Level 1 for 1 second backward(1,1) backwards Power Level 1 for 1 second turnRight(1,1) Turn right Power Level 1 for 1 second turnLeft(1,1) Turn left Power Level 1 for 1 second motors(1,1) Motors on forward at Full Power motors(-1,-1) Motors on backwards at Full Power stop() Stops the motors for i in range(4):     Do something repeat something 4 times

Project Requirements:

 Required: 1.  Select music for your Robot Dance. 2.  Use the "Dance Form Worksheet" to make an outline of the moves you want your Robot to do during the Dance. 3.  Write, save, and run a python program that defines and calls at least two movement functions.  (One for the A Section and one for the B Section of the Dance.) Extras: 1.  Decorate your robot for the dance. 2.  Create more than two functions for movement.

Process:

1.  Group students into pairs and start IDLE and connect Scribblers
2.  As a group: Review movement commands using Python Shell
a. forward, backward, turnRight, turnLeft
b. motors on and off with stop

3.  Have students start a new IDLE file and copy the following short code.  Review sections of Program.  Save and run program on Myro robots.

4.  Have students select music for their dance.
5.  Using "Dance Form Worksheet" - students must write out some movement ideas for their robot with the music.
6.  Start a new IDLE file and save it as "GroupNameDance.py" into the student's file area.
7.  Review standard form of program:

 # This is our Dance # Names of Students in Group from myro import * init() # Define functions # Define Main method # Run main method main()

8.  Guide students in coding their dance moves.
9.  Save file and run it on the Myro Robot.  Play music as Robot Dances.  If time permits - have students "Dress Up" or "Decorate" their robot.

Assessment: (With help from Joe Finkelstein)

 Beginning 1 Developing 2 Accomplished 3 Examplary 4 1. Code Format No use of Comments No use or only 1 use functions No main method Improper syntax. Some use of Comments at beginning of Program At least 2 Functions Detailed comments for each section of the program. 3 Functions - ASection, BSection, and Main method Detailed comments. More than 3 well written functions. Creative Dance. 2. Code Content Less than 3 movements for dance. Less than 1 section for dance.  No attempt at form. At least 4 dance movement commands. Uses at least 2 functions. At least 8 dance movement commands inside of 2 well defined functions. Use looping to extend movements. More than 8 dance moves. Program sequences well with music. 3. Functionality and Creativity (Wow! Factor) Code does not run. More than 4 mistakes. Little variety in moves. Code runs with less than 3 mistakes. Code runs without mistakes.  Dance matches musical ideas. Code runs without mistakes.  Creative use of movement Robot has costume or theme to dance.