Sphero factory program 1

In this post is presented the first program created with Sphero using MacroLab in our Sphero factory.

For more information about MacroLab have a look at our previous post. Sphero Macro Lab. Session 1:

In the following lines we will explain the commands used and what they are doing.

During the 14 seconds of the video the sphero will execute the following commands from the top to the bottom.


Commands used:

Loop: Repeat (x times) the commands between “loop start” and “loop end”.
RGB: Change the color of the ball for a maximum of 255ms.
Rotate: Rotate the ball.
Fade: To change the color from RGB to the color specified (making a fading effect) in a specific time.
Delay: To prolong the time of a command.
Stabilization: deactivates sphero’s stabilization allowing to do loops (“somersault”) with the ball.
Roll: Move the ball in a specific direction and duration of time.
Raw Motor: Activates the 2 internal motors that will allow to do the loops.

 Comments: Allows to describe what your commands are doing or annotations.

My comments

Section 1:
– Start loop (x2 times)
– Effect color RGB 100 ms (1/10 sec) change different color. Red/Green/Blue/Yellow
– Finish Loop
Section 2:
– Rotate 360º and perform other actions for 3 seconds (=3000 ms)
– Fade. Take the previous RGB color (yellow) and change it to black in (1,5 sec approx)
– Led on.
– Delay: to prolong the time that led is on (2.5 sec)

 Section 3:
-Deactivate stabilization
-Color effect with fade (red)
-Roll for 4 seconds
-Raw motor (execute the jump of the ball)
-Delay (prolong the time jumping)

The other laborious task is to synchronize the music with your commands. This is why you will have to calculate and modify your macros and add some delay function, so when a particular moment of the song you want a change will occur.

The song chosen has been “Angelic Happiness” from Jingle Punks.

You can download the program in he following link (and open it and modify it with MacroLab):


2 thoughts on “Sphero factory program 1”

  1. Pingback: Zachary

Leave a Reply