Control multiple Sphero Bolts

Hello!

I am currently working on a school project there the task is to make a car of four spherical wheels. So we have gotten four Sphero Bolts, and the current problem is that we need to find a way to be able to program them so all four can be controlled at the same time.

Then we found this tutorial: https://sdk.sphero.com/docs/samples_content/raspberry_pi/python/rvr_bolt_ir_sample/
where 1 to 4 Bolts are follwing a RVR.

But this is just for the balls to follow the car, which isn’t quite our task. So my question is, if anyone have done something similar or know if it’s possible for us to communicate with all four Bolts through a Raspberry Pi or something like that?

1 Like

Hi @bohmaan1,

In order to control 4 different BOLTs, you’ll need to have 4 programming devices to program and run them. The sample from the SDK that you are referring to is using RVR to broadcast an infrared message while each BOLT is set to follow that channel. What you don’t see on the back end is that each BOLT is connected to a programming device.

There are some ways that you can use the Sphero Edu app to program each BOLT with the movement commands you desire to move your car, but use IR events to trigger them all to move at the same time.

It sounds like a really cool project and you should definitely post your project once you are completed. We would love to see it in action!

1 Like

Thank you for your answer!
So if I understood right, we have to use javascript? And do you think we need to implement some sort of controller? PID-controller etc.

We are also if possible going to program different sensors to the car, for example a ultrasound sensor so it can’t run into walls. Do you think this is possible with the Sphero Bolts? I guess we need to connect them to a raspberry so we communicate like this: app -> raspberry -> bolts?

1 Like

My answer may have been a little misleading. The only way to control or program the BOLT robots is through a programming device (iOS, Windows, Android, Chrome, MacOS) with the Sphero Edu app installed. You can use Javascript to program them, but it is through the Sphero Edu IDE.

RVR is our only robot that has a public SDK that you can use a Raspberry Pi with.

Hopefully this clears things up a little more.

1 Like

Okey! But we found this video:

So it seems possible to program the Spheros with raspberry… Do you have any idea how they have made it work?

1 Like

That is our SPRK+ robot that has an SDK that has been deprecated, but it is still publicly available here: https://github.com/sphero-inc/sphero.js

For BOLT robots, it is only possible to use the Sphero Edu app.

1 Like

Using the Sphero Edu app or javascript is not the only way to drive BOLT. It’s just the only supported way.

You can communicate with Sphero BOLT directly using BLE. You just need to dive a bit deeper, learn how the low-level communication works and how it needs to be set up. You can make use of the public Sphero API documentation, of the deprecated sprk+ sdk and other projects on github and bitbucket, like SpheroMiniDrive, igbopie/spherov2.js etc. Many commands are compatible with v2 interface, but there are also some BOLT-specific ones that need to be figured out.

Macs and iPhones with Xcode, Swift, and CoreBluetooth framework work well for this purpose, because all Apple devices have BLE, but of course you can do it on any platform.

Jiri

1 Like