Programmable Robots

Virtual Lab Tour

Maya Staresinic, our programmable robot guru, explains how programmable robots can be utilized to create rich learning experiences in any makerspace!

An Introduction to Programmable Robots

SpheroScreen Shot 2016-10-26 at 10.45.38 PM

Sphero is a programmable robot that moves and lights up. It connects students to the world of programming and robotics in a simple and fun way.

Other Bots

  • BB8
  • Ollie
  • Dash
  • Dot
  • SPRK+

Curriculum Connections

Primary (Grade 1 – 3)

Grade 3 

–>Understanding Matter and Energy: Forces Causing Movement

– Overall Expectation #2: Investigate devices that use forces to create controlled movement.

– Overall Expectation #3: Demonstrate an understanding of how forces cause movement and changes in movement.

Junior (Grade 4 – 6)

Grade 4

–> Understanding Matter and Energy: Light and Sound

– Overall Expectation #2: Investigate the characteristics and properties of light and sound.

– Overall Expectation #3: Demonstrate an understanding of light and sound as forms of energy that have specific characteristics and properties.

Grade 5 

–> Understanding Earth and Space Systems: Conservation of Energy and Resources

– 3.2 – Identify renewable and non-renewable sources of energy.

– 3.4 – Recognize that energy cannot be created or destroyed but can only be changed from one form to another.

Grade 6

–> Overall Expectation #2: Investigate the characteristics of static and current electricity, and construct simple circuits.

–> Overall Expectation #3: Demonstrate an understanding of the principles of electrical energy and its transformation into and from other forms of energy.

–> Understanding Matter and Energy: Electricity and Electrical Devices

– 3.5 – Identify ways in which electrical energy is transformed into other forms of energy.

Intermediate (Grade 7 – 8)

Grade 7

–> Overall Expectation #2: Investigate ways in which heat changes substances, and describe how heat is transferred.

–> Overall Expectation #3: Demonstrate an understanding of heat as a form of energy that is associated with the movement of particles and is essential to many processes within the earth’s systems.

Grade 8

–> Overall Expectation #2: Investigate  a working system and the ways in which the components of the system contribute to its desired function.

–> Overall Expectation #3: Demonstrate an understanding of different types of systems and the factors that contribute to their safe and efficient operation.

An Introduction to Coding with Sphero

In this tutorial I’ll walk you through how I was able to get a group of grade 7 students with no prior coding experience programming robots in about 45 minutes! Although this activity was designed for grade 7, you could easily modify it for other ages.

For this lesson/activity, you’ll need the following:

  • As many Spheros as you can get your hands on.
    • I was lucky enough to be working with groups of 6, so everyone had their own robot. 1-2 students per robot is ideal, and I imagine 3 would work if you give students something they really need to put their heads together for
Sphero

This adorable fella is the Sphero, a programmable robot!

  • An iPad/Phone for every student
    • One per student is ideal, but only one device can control the Sphero at a time
    • When I did this, everyone was on an iPad, but after some digging it looks like there are possibilities for Android as well. A tablet is recommended over a phone here, as a larger screen will reduce the amount of clutter
  • An app for controlling your Sphero USING CODE. There are plenty of apps that let you just drive and give commands, but the focus here is on getting students into coding. Possible apps include
    • Tickle – This is what we use in the lab, unfortunately this is iOS only
    • Tynker -Looks like a great alternative that works on both iOS and Android
    • SPRK Lighting Lab for Sphero -also available for iOS and Android

Tickle-badgeTynker logoSPRK Logo

  • An app called Lightbot (Hour of Code) installed or available to download if using student devices
    • This is what will introduce students to the procedural thinking behind programming their robots. The app is a seemingly simple game of moving a robot around a grid to light up blue squares, which all the students seemed to engage with an enjoy. There are a few versions of it out there, the one we’re using the the Hour of Code version, which is FREE
Lightbot Logo

Lightbot App Logo

Optional materials:

  • Ramps for the Spheros (these should come in the box with the robot itself)
  • Tape
  • Cardboard

Before trying this in your classroom, I highly recommend playing around and exploring the apps and tools used to get a feel for them. Below I’ll break down each section of the lesson, how long it should take and the purpose for each section.

Total time: ~45 Minutes 

Introduction (~3 minutes)

Go over the agenda and expectations for the day, establish rules for the technology if you haven’t already. Take this opportunity to show off the robots to students, you may want to prepare something before class starts to really WOW them.

Lightbot (15-20 minutes)

Have students open up the Lightbot app on their device and explain the basics of the game. Computers are pretty dumb, they’ll take your instructions literally and do EXACTLY what you tell them to, even if it means doing the same thing over and over until you crash! The game has a built in tutorial that teaches the basics of moving the character and playing the game, and I highly recommend having your students start there.

If you find students are really struggling, you may want to walk through some of the levels together or address problems as they come up. The whole point here is to get students used to something taking their instructions literally. This may be frustrating and unintuitive at first, but I found once students figured out the first few levels, they were hooked!

light bot sample

Anything in the “MAIN” folder will run, PROC1 won’t run unless called in MAIN

After finishing the “Basics” module, I recommend having students finish the first 2-3 levels of “Procedures” and “Loops” before moving on to using the Sphero. This will give students a chance to see how useful these features really are; completing a task in 3 lines always trumps brute forcing it in 12! The more levels students can complete, the better, but I wouldn’t spend over 25 minutes on Lightbot if you only have 45 minutes.

Introduction to Block Coding (5 Minutes)

Take a few minutes to get your groups organized with Spheros and opening whichever app you’re using. Once everyone is set up, I would go through the basics of setting up a block of code.

First, you need to start each block with an “Event” in Tickle, which are orange. Any motion, colour changes, loops, etc. that you want to happen for a particular event should connect like a puzzle to the pieces above it, with the event at the top. I’ve included a sample picture below.

Tickle Block Sample

You’re almost ready to get students coding and playing, but first we need to connect the Sphero.

Programming Challenges (15-20 minutes)

Before you can start coding, you need to connect your iPad and your Sphero. Luckily, all you have to do is turn on your bluetooth and connect to the Sphero with the colour code that corresponds to the colours your Sphero is flashing. MAKE SURE YOUR SPHEROS ARE NOT ON THE CHARGING STATIONS AT THIS POINT, this was a bit of a headache the first time through but the charging stations seem to switch off the Sphero and does not allow you to connect to them.

Connecting Sphero

Notice the Sphero is NOT on the charging station!

For example, if your Sphero was glowing red, blue then green, you would connect to Sphero-RBG in the bluetooth menu.

After everyone is connected, start issuing your students challenges! Below I’ve included a list of ones that I used, but you don’t have to stop there! Come up with your own, or do a quick Google search and you’ll find endless ideas of programming challenges for your students.

Some of the activities I used were

  • Moving the robot (this one is easy, but essential!)
  • Send the robot somewhere and then come back
  • Set up a program to help the Sphero get unstuck when it collides with different objects
  • Set up something to stop the Sphero if you can see it headed for danger!
  • Move the robot in a square or other regular polygon
  • Move the robot in an irregular polygon (this could be a great math connection!)
  • Moving the robot in a shape using loops
  • Changing colours
  • Navigating a pre-set maze or obstacle course
    • You could even just set tape on the ground and have students come up with their own puzzles to solve
  • Set up different areas that students need to navigate to, change colour/spin/do something before moving on to the next area
  • Use the ramps to jump into a stand/roll of tape or onto another ramp
  • Coordinate a dance using multiple Spheros

The most important thing with these challenges is making the goal clear and achievable without being so easy that students can solve them without a bit of experimentation, so keep that in mind if you’re designing your own challenges.

If you’re having technical trouble with the Spheros, I found the self help website for Sphero to be very helpful. If you don’t want to mess around too much or don’t have much time, there is also a quick-start guide that comes in the box that should get you up and running in a few minutes.

Clean Up (~2 minutes)

Can’t neglect planning for this step! I think having students pack everything back into the box or where ever you’re storing everything would be the most efficient use of time. You may have to plan extra time for clean up, depending on the size of your class.

References

Kurkovsky, S. (2013). Mobile Computing and Robotics in One Course: Why Not? Retrieved from http://www.cs.ccsu.edu/~stan/research/cseducation/iticse2013.pdf

Timberdoodle Co. (2016) SPRK Lessons. Retrieved from http://www.timberdoodle.com/Articles.asp?ID=387