Python Library¶
bugbot-python runs on your laptop and controls a BugBot through the USB dongle, so you can program the robot from your own Python environment, or use the laptop for the heavy work such as training and running larger AI models.
The library is the third implementation of the same bugbot API: a script written for the IDE runs unchanged from the laptop.
from bugbot import *
connect() # connects through the dongle
forward(50)
wait(1)
stop()
print(distance())
go() runs your script on the laptop and sends each call to the robot (proxy mode). go(upload=True) sends the whole script to the robot to run there, streaming the output back.
For several robots, or explicit control over the connection, use the Robot class:
Install¶
The library is not released yet. It will be available to install when the robots and the dongle ship.
Status¶
The library currently implements the previous robot's API. It is being brought up to contract v1 alongside the new dongle.