Skip to main content

Library Documentation

The micro:bit Space Science Kit is based on the Nezha Breakout Board V2, with the micro:bit as the main control board, and its programming platform is Microsoft makecode. To facilitate the programming of the micro:bit Space Science Kit, ELECFREAKS has developed an independent programming library specifically for the Nezha Breakout Board V2. The following is a detailed description of the functions and parameter ranges of each programming command:

Translated with DeepL.com (free version)

FunctionCommandParameterIllustration
Basic ControlParameter 1 Type: Drop-down options
Parameter 1 Range: A/B/C/D
Parameter 2 Type: Drop-down options
Parameter 2 Range: Clockwise
Parameter 3 Type: Number
Parameter 3 Range: 0~360
Parameter 4 Type: Drop-down options
Parameter 4 Range: Degrees/turns/seconds
Set the motor to rotate in a set direction for a set angle/number of turns/time
Parameter 1 type: drop-down options
Parameter 1 range: A/B/C/D
Parameter 2 type: drop-down options
Parameter 2 range: clockwise/counterclockwise/shortest path
Parameter 3 type: number
Parameter 3 range: 0~360
Set the motor to rotate the set angle in the set direction or shortest path
Parameter 1 Type: Drop-down selection
Parameter 1 Range: A/B/C/D
Parameter 2 Type: Drop-down selection
Parameter 2 Range: Clockwise
Counterclockwise
Set the motor to rotate in the set direction
Parameter type: drop-down options
Parameter range: A/B/C/D
Turn off the setting motor
Parameter 1 type: drop-down option
Parameter 1 range: A/B/C/D
Parameter 2 type: number
Parameter 2 range: 0~100
Set the motor speed to the set value
Parameter type: drop-down option
Parameter range: A/B/C/D
Return value: number
Return value range: 0~360
Get the rotation angle of the motor
Parameter type: drop-down option
Parameter range: A/B/C/D
Return value: number
Return value range: 0~360
Get the rotation speed of the motor
Parameter type: drop-down options
Parameter range: A/B/C/D
Set motor to zero
Combined ControlParameter 1 type: drop-down options
Parameter 1 range: A/B/C/D
Parameter 2 type: drop-down options
Parameter 2 range: A/B/C/D
Specify settings for left and right wheel motors
Parameter type: Number
Parameter range: 0~100
Set the left and right wheel speeds to the set values
NoneStop the left and right wheel motors from rotating
Parameter type: drop-down options
Parameter range: forward/back
Set the left and right wheel motors to rotate in the same direction. For example, in the case of the smart car, it can achieve the effect of moving forward or backward.
Parameter 1 type: number
Parameter 1 range: 0~100
Parameter 2 type: number
Parameter 2 range: 0~100
Set the speed values ​​of the left and right wheel motors respectively
OthersReturn value type: Number
Return value range: Code composed of 0~9
Returns the version number of Nezha Breakout Board V2