Skip to main content

MicroPython

MicroPython is the text-based programming mode in the Dotbots app.

It is more advanced than Draw-to-code and Blockly because users write code directly.

This mode is useful for users who already understand basic programming, or for those who want to learn real coding step by step.

When to use MicroPython

Use MicroPython when you want to:

  • write more detailed robot behavior
  • create more advanced programs
  • control the robot more precisely
  • test ideas directly in code
  • move beyond visual programming

Code editor

The MicroPython section includes a code editor where you can write scripts for the robot.

Dotbot-specific functions are available through the Dotbot programming library.

The editor can also help with:

  • autocomplete
  • type checking
  • error messages
  • testing code on the robot

Built-in documentation

The app includes built-in documentation for MicroPython functions.

This can help users understand:

  • what a function does
  • what values the function needs
  • how to use the function correctly
  • example code snippets

AI helper

If enabled, the app includes an AI helper for MicroPython.

The AI helper can help explain code, understand errors, and create example code.

There are two modes:

  • Code only
  • Teacher

Terminal

The MicroPython section also includes a terminal.

The terminal lets users send commands directly to the robot and test small pieces of code quickly.

Direct control during coding

If the robot is far away from you, you can use the driving arrows to drive it closer.