Skip to main content

Unofficial library for sphero v2.

Project description

PySphero

PyPI - Python Version Build Status

This is an unofficial Sphero library for BLE toys.
The Sphero protocol is reverse-engineered using the official Sphero Edu application for Android and this library.

This code is tested only on Sphero Bolt. Probably it will work on the other BLE toys too.

Install the dependencies

For using this library need bluepy and libgtk2.0-dev.

# apt-get install libgtk2.0-dev
# pip install bluepy

Install

To install pysphero use pip:

# pip install pysphero

Example

from time import sleep

from pysphero.core import Sphero


def main():
    with Sphero(mac_address='aa:bb:cc:dd:ee:ff') as sphero:
        sphero.power.wake()
        sleep(2)
        sphero.power.enter_soft_sleep()


if __name__ == '__main__':
    main()

Unknown

Packet contains sourceID and targetID. Their meaning is unknown.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysphero-0.0.4.tar.gz (13.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page