Raspberry Pi BB-8 screenshot

Overview

After seeing this idea on YouTube, I got a Sphero BB-8 running from a Raspberry Pi with an Xbox 360 controller. It worked on a Pi 2 with a Bluetooth LE dongle and on a Pi 3 with its built-in Bluetooth.

Credit

The code is Joseph Kim's SpheroBB8-python, which builds on work by davinellulinvega and ali1234.

Getting it running

  • Install Raspbian Jessie, update the system, expand the filesystem, and set the Pi to boot to the console.
  • Install pip, the GLib development files, and the bluepy Python package.
  • Download SpheroBB8-python to the Pi.
  • Scan with hcitool lescan to find the BB-8's MAC address, then add it to BB8_driver.py.
  • Run BB8test.py. BB-8 lights up white, cycles through colors once connected, and turns orange after disconnecting.
  • Run BB8joyDrive.py and drive with the Xbox controller.