Tuesday, May 13, 2014

Sphero: OrbBasic Lesson 1

Sphero is a wonderful and innovative programming ball/orb that can be used for countless activities in education.  In earlier posts I covered how the Sphero can be programmed to change color, travel distances, figure out linear equations and more.  This post will cover a new and free app (OrbBasic) that uses the Sphero to explore Computer Science concepts such as program flow and variables.

*All data will be recorded by the student in the downloadable worksheet.

Objective (aligned to Common Core Math Standards)
  • Create a short OrbBasic program that rolls Sphero out a distance and back, and then stops
  • Modify the OrbBasic program to add a goto statement that goes back to the beginning
  • Modify the OrbBasic program to add a variable that holds the delay time
  • Add a line to increase the delay variable after each time out and back
  • Modify the program to decrease the delay variable each time out and back
Creating a OrbBasic Program
Students will need to download the free app OrbBasic by clicking here.  The OrbBasic goroll command does not have a delay so a student will have to have follow that w/ a delay command.  OrbBasic roll speeds range from 0 to 255.  Students must keep in mind that the code must be exact or the Sphero will not read it.  Once the student has successfully completed having the Sphero move out and return, they can change the code to make the Sphero follow that pattern indefinitely.  All codes can be found in the free downloadable Student Guide.

A variable is a space in the Sphero's memory that holds a number.  Student's will use these variables to hold the amount of delay time.  Have students add a new variable called d and set it to 2000.  Then if they change the delay times to d, that variable if changed on the first line will replace it in the rest of the code.  For example, if they change the variable to 3000 it will now run for 3 seconds instead of 2 or 2000.

Also, a student can modify the code by adding a delay time or add (500) to d.  Now when the students run the program it will have the Sphero roll away and back half a second more.

I highly recommend checking out Sphero for Education by clicking here!!!

For my Pinterest board on the Sphero click here.

No comments:

Post a Comment

Thank you for leaving a comment and reading my blog!!