Skip to main content

Root robot

Python async API for iRobot Root (coding robot) over bluetooth-low-energy protocol.

Protocol specifications from https://github.com/RootRobotics/root-robot-ble-protocol.

Installation

Install the aiorobot package from PyPI with pip.

pip install aiorobot

Quickstart

To simply run the robot, use the run function of aiorobot module. It takes coroutine callbacks for different root robot events.

from aiorobot import run

async def main(robot):
    for i in range(4):
        await robot.led.on((0, i * 80, 100))
        await robot.motor.drive(150)
        await robot.motor.rotate(900)
    await robot.disconnect()

run(started=main)

This will search for a root robot in bluetooth devices, connect to it and call the main coroutine when the root is ready. So make sure you have bluetooth enabled and working on your computer.

Accepted keyword-arguments of run function are event names listed in aiorobot/events.py.

You can also directly get a robot and interact with it with get_robot function that you can use as an async context-manager to start the connection.

import asyncio
from aiorobot import get_robot

async def main():
    async with get_robot() as robot:
        await robot.motor.drive(150)

asyncio.run(main())

Then you will need to handle events yourself (iterate over robot.events or call robots.events.process()) to get updates from the robot.

See more code examples in aiorobot/examples directory.

Metadata

Release files for aiorobot 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiorobot 0.3.0
File Size Uploaded Provenance Actions
aiorobot-0.3.0.tar.gz 10.9 kB Without provenance Details for aiorobot-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiorobot 0.3.0
File Interpreter ABI Platform Actions
aiorobot-0.3.0-py3-none-any.whl Python 3 none any Details for aiorobot-0.3.0-py3-none-any.whl

Total release size: 24.5 kB

Release files / aiorobot-0.3.0.tar.gz

Download URL aiorobot-0.3.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
56174fdabf91edbfbce973112375c700946b5b5a617dd4ddb6bd51dc2a31f2f0
BLAKE2b-256 checksum
How to use checksums
b3bb2abb2c49098e989ea0e01f5ae2900d479e02b08ae72c59af7e574fcb7aa2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

Release files / aiorobot-0.3.0-py3-none-any.whl

Download URL aiorobot-0.3.0-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f039beac8d0891ee0a3752352ea9109181c1170dcccc3265c75fa7e50f659b1b
BLAKE2b-256 checksum
How to use checksums
436855daa8de7317702517a381c3eb3870e820d316ea515c0dced94206337317
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

Security for aiorobot 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page