MecaDrive is a motor control library for micro:bit, designed for DFRobot motor driver expansion boards (DFR0548). It provides intuitive blocks for controlling mecanum wheel robots and individual DC motors.
Perfect for educational robotics projects with kids!
- Mecanum Wheel Control: 10 directional movements (forward, backward, strafe left/right, rotate CW/CCW, 4 diagonal directions)
- Heading-Based Control: Move in any direction using compass heading (0-360°) - perfect for navigation, tracking, and smooth directional control
- DC Motor Control: Individual control of 4 DC motors (M1-M4) with configurable directions
- Simulator Support: Visual feedback in MakeCode simulator for testing before deployment
- Configurable: Runtime configuration for motor directions and brake strength
- Kid-Friendly: Natural language blocks in English, German, and Chinese
- Hardware Optimized: Handles HR8833 chip quirks automatically
Control omnidirectional movement with mecanum wheels:
- Named Directions: Use dropdown to select Forward, Backward, Strafe Left/Right, Rotate CW/CCW, Diagonal (4 directions)
- Heading Control: Use compass heading (0-360 degrees) for smooth directional control
- 0° = Forward (North)
- 90° = Strafe Right (East)
- 180° = Backward (South)
- 270° = Strafe Left (West)
- 45°, 135°, 225°, 315° = Diagonal movements
- Any angle for smooth omnidirectional movement
- Variable speed (0-255)
Control individual motors M1-M4:
- Clockwise/Counter-clockwise direction
- Variable speed (0-255)
- Motor stop (individual or all)
- Motor direction configuration (for different chassis layouts)
- Brake strength adjustment for M3/M4 motors
Compatible with DFRobot DFR0548 motor driver expansion board:
- 4x DC motor outputs (M1-M4)
- 9x IO interface pins (P0, P1, P2, P8, P12, P13, P14, P15, P16) with Gravity connectors
- PCA9685 PWM controller via I2C
Note: The IO pins are standard micro:bit GPIO pins made accessible through Gravity connectors. Use standard micro:bit pin blocks for sensors, switches, and other digital/analog inputs.
GNU
- for PXT/microbit