This page documents parts of the API that are for more advanced use. Most students will never need to use features from this page.
These features are for advanced users only.
It is possible to run your robot in “Debug Mode”.
In “Debug Mode”, your robot will print more information about what it is doing.
from sbot import Robot r = Robot(debug=True)
Debug mode is quite verbose. It will print a lot of information that you will not need.
It is possible to test your code in “console mode”.
This allows you to see every interaction that your robot makes with its hardware interactively. It may be useful to help debug your code.
You need to have the
sbot library available on your computer.
Using Console Mode¶
Console mode is activated by instantiating your
Robot object with a
from sbot import Robot from sbot.env import ConsoleEnvironment r = Robot(environment=ConsoleEnvironment)
Robot code that is using Console Mode should be executed on a computer only.
python3 main.pyin a terminal window.
- Execute the code using PyCharm.
Running Console Mode code on a robot will result in a non-functioning robot.
Console Mode will print the current actions of your robot, and prompt you for information about it.