You got your Sphero BOLT, you’ve downloaded the Sphero Edu app and taken it for a spin, now what? There are endless opportunities for fun things you can do and learn with your BOLT, all you have to do is master its full potential. Every programmer has to start with a simple “drive forward” and go from there, learning and mastering new skills in the process. In this blog, we’ll cover the basics of programming with Sphero BOLT and how to level up your knowledge along the way.
What is Programming?
Draw is as simple as it sounds. Whatever path you draw in the app your BOLT will follow. Block-Based Coding uses a drag-and-drop environment and is a great introduction to programming for beginners. Each block contains a piece of code that can be connected to other blocks to create a program. A major advantage of Block-Based coding is that the blocks are color-coded by function and shaped so that the correct types of code fit together. In the Sphero Edu app, you can long-press a block to get more information about its function and units of measurement. We recommend taking a look at all the available blocks before you get started so that you can get an idea of what your options are.
Programming BOLT to Move
At the bottom of the screen in the Sphero Edu app, you will find different block categories. The first of these is movement blocks, which control the motors and control system in the BOLT. These blocks contain code to make the robot move, spin, and stop. You can edit the heading (angle), speed, and duration/delay.
Try this activity in the Sphero Edu app to get started: Beyond the Square
Programming BOLT’s Lights and Sounds
These two categories contain blocks that control the LEDs inside BOLT as well as the 8x8 LED matrix on top, and the various sounds that play out of your device. With so many different light blocks, you can get creative with colors, patterns, and intensity. There are also a wide variety of different sound options such as animal noises and aliens so you can tell a story or create a new character.
Learn more about lights with BOLT here: BOLT: Matrix
Programming Loops with BOLT
The controls section allows you to refactor the program through loops. Refactoring means improving the way the code is written while making sure it does the same actions. Whatever commands are inside the loop block will be repeated the number of times specified by the loop block. Without loops, if you wanted to repeat a sequence you would need to at least double the number of blocks. With loops, you just need to adjust the number of times the loop runs, or select a loop forever, no additional blocks are needed!
Try this activity in the Sphero Edu app to learn more: Grow with Sphero - Spherograph
See it in action below!
Other Block Categories
There are seven more types of blocks included in the Sphero Edu app coding environment that are more advanced than the three outlined above:
- Operators are math statements to modify or create values.
- Comparators can compare two values and create conditional logic.
- Sensors add read-only values streamed from the robot’s sensors.
- Communications control a BOLT or RVR’s ability to send and receive infrared (IR).
- Events can embed conditional logic in predefined functions.
- Variables are values that limit redundant logic.
- Functions help organize complex logic.
Try these activities in the Sphero Edu app to get started.
Now that you know the basics of programming your BOLT to move, light up, make noise, and repeat actions, you can explore all possibilities of coding your robot. Need additional inspiration? Check out the Sphero Edu App to find free guided coding activities for learners of all skill levels!