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.
| 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 |
- 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.
- 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.
| 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 | ❌ |
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!
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!