Thursday, October 2, 2014

Sphero: Orb Basics Lesson 3

The next lesson in my series of Sphero lessons aligned to Common Core Standards is the concepts of reading sensors and storing data in variables.  Students will use the free OrbBasic text based iOS app to write simple programs that the Sphero will detect when it is in the air or collides w/ another object.  Upon these conditions the Sphero will then change it's behavior or color.

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

Objectives (aligned to Common Core Math Standards)

Students will:
  • Create a short OrbBasic program that changes the color of the Sphero when it senses that it is in the air.
  • Create another OrbBasic program that recognizes when Sphero collides w/ another object and then changes color.
  • Create a third OrbBasic program that sends the Sphero in a random direction after the collision.
Students will learn a new command called accelone which causes the Sphero's accelerometer to sense that when it is in the air.  Usually, the accelone is set to 0 but students will set it to to < 200.  Students will use a conditional statement and the LEDC commands to change the color of the Sphero when it is in the air.  If the condition is false then the program will loop back to the beginning.

Sensing collions

Students will create a macro that will be sensing collisions instead of when the Sphero is in the air.  They will build a code to read if the accelerometer is greater than 5000 (indicates when Sphero collides w/ something).  If this conditional statement is true it will then move down to the next line of of the program which commands the Sphero to change to the color of red for 1 second.  

Fun Challenge  

Students will build a code that will make the Sphero drive straight and then move in a random direction after a collision.  (see teacher's guide for code/answer)

To view more educational lessons that you can do w/ the Sphero click here!!!

For my Pinterest board on iOS Apps for the Sphero click here.



No comments:

Post a Comment