The Keyestudio KS0308 Motor Drive Breakout Board for the BBC micro:bit does not require a dedicated or imported software extension library in Microsoft MakeCode; you control its dual DC motors directly via native micro:bit digital and analog PWM pins. [1]
Pin Mapping for MakeCode
To drive the motors connected to the KS0308 board in your MakeCode project, use standard pin-control blocks assigned to these specific micro:bit connections: [1, 2]
Motor A (Terminals A1, A2):
Direction 1: Pin 12
Direction 2: Pin 13
Speed (PWM): Pin 1 [1]
Motor B (Terminals B1, B2):
Direction 1: Pin 15
Direction 2: Pin 16
Speed (PWM): Pin 2 [1]
Basic Control Logic
Forward / Reverse: Set one direction pin High and the other Low, then apply an analog PWM signal to Pin 1 or Pin 2 for speed.
Brake / Stop: Set both direction pins to the same state (Low/Low for float stop, or active combinations for braking). [1]
Would you like an example of a MakeCode block layout/code snippet for controlling car steering or speed regulation with this board?