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.
import bugbot; bugbot.go() # 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¶
or copy the bugbot/ folder next to your script.
Status¶
The library currently implements the previous robot's API. It is being brought up to contract v1 alongside the new dongle; the work list is in the repository's CONTRACT_GAP.md.
Source and full reference: bugbot-python.