Skip to content

Latest commit

 

History

History
32 lines (18 loc) · 713 Bytes

File metadata and controls

32 lines (18 loc) · 713 Bytes

Make: IoT Robots

# Control Sphero with Python

Getting Started

To control Sphero with Python, we'll can use:

https://github.com/CMU-ARM/sphero_sprk

The following is some sample code to get you started:

from sphero_sprk import Sphero

orb = Sphero("XX:XX:XX:XX:XX:XX")
orb.connect()

orb.set_rgb_led(255,0,0)
orb.roll(100,0)

To run your Python script do:

$ python3 your_script.py

Other Notes

There are actually several Python libraries to control Sphero, but this one definitely works :). Please take note that it doesn't work on Mac because of compatibility issues with the bluepy library.