Skip to content
/ mBot2 Public

Code examples for mBot2 and CyberPi supporting Python (MicroPython) and Arduino (PlatformIO).

License

Notifications You must be signed in to change notification settings

PerfecXX/mBot2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mBot2

This repository contains a collection of programming examples for controlling the mBot2 robot and CyberPi main control board. It serves as a dedicated resource for developers who want to write custom code for these devices, beyond the mBlock environment.


Language and Platform Support

Platform / Hardware Support MicroPython Arduino (PlatformIO) Recommended IDE/Tool
CyberPi MicroPython: mBlock 5 / Arduino: VS Code (PlatformIO)
mBot2 Shield MicroPython: mBlock 5
Pocket Shield MicroPython: mBlock 5
mBuild Modules MicroPython: mBlock 5

Important Notes

  1. CyberPi API Support:
    • MicroPython: Provides Full API Support for all CyberPi features and functionalities.
    • Arduino (PlatformIO): Supports fewer features and some functionalities may be unavailable compared to the MicroPython API.
  2. Firmware Overwriting Risk:
    • Using MicroPython will NOT overwrite the current CyberPi firmware.
    • Using Arduino (PlatformIO) will overwrite the device's firmware. This means the CyberPiOS will be inaccessible, and you may lose compatibility with certain accessories (e.g., Bluetooth Controller, Bluetooth Dongle). Any files previously saved on the board will also be lost upon flashing.

Example Code

Category Platform / Hardware MicroPython Examples Arduino (PlatformIO) Examples
CyberPi Core CyberPi RGB LED, Sensing, Display, Audio, Motion Sensing, WIFI, LAN, Cloud, AI Project Template, RGB LED, Sensing, Display, Audio, Motion Sensing
Extension & Shield Extension Upload Mode Broadcast, MQTT
mBot2 Shield mBot2 Chassis, mBot2 Extension Port
Pocket Shield CyberPi Pocket Shield
Modules mBuild Module Ultrasonic Sensor 2, Quad RGB Sensor, Bluetooth Controller, Smart Camera, Science Sensor, More

Projects

This section features integrated and larger-scale projects built using the code examples in this repository. These projects demonstrate practical applications and complex functionalities of the mBot2 and CyberPi.

Click Here to explore more projects!


Tools

A collection of utility scripts, debugging aids, and essential tools needed for firmware management, flashing, or advanced development outside the standard mBlock environment.

Click Here to explore more tools!


About

Code examples for mBot2 and CyberPi supporting Python (MicroPython) and Arduino (PlatformIO).

Topics

Resources

License

Stars

Watchers

Forks