Get coding with Sphero BOLT

Sphero BOLT is the newest addition to the Sphero family. Equipped with light sensors, a built in compass, and a programmable 8×8 LED matrix, it’s also the most technologically advanced Sphero yet. Compatible with the Sphero Play app, Sphero BOLT can be driven around like a remote control vehicle, and it can also be used as a joystick for 3 different games. So with this much fun on offer, how can you convince your youngsters to quit the Sphero Play app, and get on with some coding in the sister app, Sphero Edu? And once in the Edu app, what should they do? Well, if you’re a parent or educator looking to get the most educational value out of this innovative robotic ball, look no further. Let’s get coding with Sphero BOLT!

Sphero BOLT and education

Sphero BOLT can be programmed using the Sphero EDU app, in three different ways:

  • Draw- draw paths on your mobile device for the robot to follow in the real world
  • Blocks- Scratch based block coding software
  • Text- write text programs using JavaScript

Depending on the curriculum in your local area, children from the ages of 6-14 will probably get the most out of the block coding option. And older children will also need to start using JavaScript too. The block coding software allows users to stack command blocks that can control Sphero BOLT’s movements, lights, sounds and sensors, and create programs limited only by their imagination. The programs created can range from a simple sequence, to a complicated code with functions, variables and loops. So whatever stage or level your youngster or class are, Sphero BOLT, and the Sphero Edu app, offer something for everyone.

Using Sphero blocks software

Before you get coding with Sphero BOLT, make sure you understand the block based coding software. Using the Sphero blocks software is fairly easy and straightforward. And if your child, or your class are familiar with Scratch, they should find it fairly easy. To get started, just navigate from the home page of the Sphero Edu app, to the programs icon along the bottom of the screen. Then click on the small green circle, with the add sign in the center, and name your program, choose Blocks, and tick which robot you are using. This will open up the programming canvas.

Along the bottom of the screen you will see different colored sections: “Movements”, “Lights”, “Sounds” etc. And by clicking on these colored segments you will have access to the blocks that can control these different elements of the Sphero BOLT robot. Don’t forget to scroll across and see the full range of blocks available for each element.

To use a block, simply click on it and drag it up to the start program block, where it should snap into place below it. Each block you use, snaps together with the one before it. If you just place a block on your screen, unconnected, this block will not run as part of your code.

Lightning Cover for BOLT

Sphero BOLT and JavaScript

Children over a certain age, in some curriculum’s, will be expected to progress to text based programming languages, just like JavaScript. One of the best features of the Sphero Edu app, is that your block codes can be displayed as JavaScript at the touch of a button. So once you have created a program with blocks, you can see the JavaScript version of this code. And by clicking the “Copy Code” button, opening a new text based programming canvas, and pasting in the code, you can edit and change a full JavaScript program. One that your class, or child, will already understand. This can be very helpful, and even give your youngsters a head start when it comes to text based programming languages.

Sphero Edu Activities

For structured activities specifically designed for different age ranges and curriculum levels, the Activities section of the Sphero Edu app is a goldmine. These activities are even designed to fit with themes or topics that might be suitable for cross-curricular learning.

Get coding with Sphero BOLT across different ability levels

Different programs can be created for Sphero BOLT, using Sphero Edu, that develop in complexity along with your child or your students level of ability. To show what we mean, we’ve put together a series of programs taking a ten second “hot-potato” timer, from the most basic level, right through to higher ability using the Sphero Edu block based software.

How to create a basic Sphero BOLT “hot potato” timer

In any curriculum the basics of programming are discussed as sequencing. Understanding that creating a program or writing a code is just the same as writing a set of instructions for a machine to follow, is the underpinning principle of all computer science. So to demonstrate this, children can create an easy and simple sequence, to program a “hot potato” timer, that will make noise and flash at the end of the 10 seconds. So this isn’t just educational, it’s also a lot of fun too!

In this program, the Sphero BOLT will flash green three times, to indicate it is ready. Then it will do nothing for 10 seconds, before flashing red and making a chime noise.

Once they understand sequencing, you can introduce for loops. By editing the existing code for the “hot potato” timer, to loop an action every second, for ten seconds, you have the same outcome, but with improved usability. This program will allow someone using the timer to count down the flashes, instead of just waiting for the alarm. And your youngsters will know how to loop pieces of a sequence for a more useful program.

In this program the green light will flash every second. And this will repeat 10 times because the blocks are inside the for loop. At the end of the ten seconds, the lights will flash red, and the chime will sound.

How to create an intermediate Sphero BOLT “hot potato” timer

If your class, or your child, already has a good grasp of for loops, you could consider making this program even more complex. Why not make the alarm repeat, until someone shakes it to stop? To achieve this, the class will need to understand how to interpret data. Namely, the data collected from Sphero BOLT’s velocity sensor. And then use this data in a while loop, to repeat the alarm sound until the BOLT is shaken.

This is the same as the previous program, except that the alarm and the red light will repeat until Sphero’s velocity is more than 20. A vigorous shake should do the job!

If this isn’t complicated enough, you could introduce your youngsters to variables. Create a variable for time, and change this variable by 1 each time the loop is repeated. Sphero BOLT can read out this number, every time, counting up to 10. An extra challenge could be for your class or child to change the time variable number so it starts at 10, and decreases to 0 throughout the program, counting down to the alarm instead of up.

This program is the same as the previous version, with the addition of a variable called Time, which changes by 1 each second in the loop. The value of this variable is then read out each second. The light has also changed to scrolling text, reading “Times up!”.

How to create an advanced Sphero BOLT “hot potato” timer

For the more advanced classes or levels, this same code can be further edited to include a function, and if statements, on top of everything else.

In this version of the “hot potato” timer, the LED matrix will be used throughout the program, to display the remaining time, but there is a catch. The matrix animation needs to be a character variable and not a number variable. While a character variable can be used to store a number, a number variable can not be used to store a character. So you need to make a quick conversion function. This changes the value of the character variable, depending on the value of the original “Time” variable.  And this can then be displayed on the matrix, to countdown the timer alongside the voice. Just make sure to call the function inside the loop, to change the value each time.

Coding tips for Sphero BOLT

Before you get coding with Sphero BOLT, consider these tips:

  • Start simple and build upwards- don’t try and rush in at an intermediate level, before the basics have been fully covered and your youngsters understand the foundations of programming. Instead, allow them time to practice with simple programs, and then build on these programs to create something more substantial, that will cover more of your Computer Science targets. Just like in the “hot potato” timer example.
  • Don’t forget the fun- the educational value of Sphero BOLT might be the most important factor, but this doesn’t mean that coding can’t be fun. Choose to create programs that will be fun to test and try out, and you will keep any youngster interested for longer.
  •  Make time for testing- testing programs and trying them out is one of the best ways to find errors and begin to debug. Make sure there are enough opportunities for your child, or students, to “play” with what they have made. Not only will this provide a sense of accomplishment, but it will also help them be more interested and motivated to code.

Sphero Bolt is a fun robotic ball with education at heart. To unlock the potential start simple and keep the element of fun in mind.

Read more about the Sphero BOLT here