Feature Description

Broadcast data to other LoRa devices in the same frequency band using the LoRaWAN module.

LoRaWAN Module

LoRaWAN init Rx Mode with data Set the data receive callback.

Set point to point with frq Set the communication frequency.

Send string Send a message.

Get data Get received data (used within the data receive callback).


Press button A/B to send messages and listen for received data in real time.

LoRaWAN Usage


Feature Description

Stepper motor control.

Stepper Motor

Motor Address Module's I2C address.

Motor X Y Z Speed Set the number of steps and speed for the stepper motor's X, Y, Z axes.

Put g code Execute G-code.

Set mode Set the motor operation mode, distance mode, or relative value mode.

lock motor Lock the motor.

unlock motor Unlock the motor.


Alternating forward and reverse motor operation.

Stepper Motor Usage


Feature Description

Servo control.

Servo Control

Set servo rotate Set a specified servo angle.

Set servo write us Set servo pulse time.


Control servos 0-5 to rotate 90 degrees.

Servo Usage

Bala Motor

Feature Description

Control the Bala encoder motor operation.

![Bala Motor]( https://static-cdn.m5stack.com/resource/docs/static/image/Modules/Bala Motor.webp)

set rotate speed Set motor rotation direction and speed.

Run Speed Set to walk in the direction of running at a certain speed for a certain number of pulses.

Go To Position MaxSpeed Run 500 pulses at the set speed.

Stop Stop the motor.

Read encode Read the encoder value.


Press button A to walk forward 500 pulses at a speed of 255.

![Bala Motor Usage]( https://static-cdn.m5stack.com/resource/docs/static/image/Modules/Bala Motor_user.webp)


Feature Description

Control Bala operation.


Move Set motor rotation direction and speed.

Turn Set the number of pulses for turning.

Rotate to Set the degree of turning.

get angle Return the current angle.

set angle offset Set angle offset.

balance loop Automatically balance.


Bala moves forward 500 pulses and turns 45 degrees.

Bala Usage


Feature Description

Control the operation of the Lego encoder motor.

DC Motor

Set rotate pwm Set motor direction and speed.

Stop Stop the motor.

Clear encode Reset the encoder.

Read encode Read the encoder data.


Set the motor to run for 5 seconds and then stop.

DC Motor Usage


Feature Description

Detects dust particle matter, outputting concentration or number.

PM2.5 Module

PM2.5 get value in Set the particle diameter and detection mode, return the detection result. SPM is the standard particle concentration value, APM is the atmospheric environment particle concentration value.

PM2.5 get particles above um number Return the number of particles of a specified diameter.


Display the number of PM2.5 particles on the screen.

PM2.5 Usage


Feature Description


Feature Description

Controls LEGO motors and servos

BaseX Module

Set to Mode Sets the motor mode (normal/position/speed).

Get encoder value Retrieves the encoder value.

Set encoder Sets the encoder value.

Set speed Sets the motor speed (normal mode).

Get speed in 20ms Retrieves the motor speed within 20ms.

Set position point to Sets the motor position.

Set position PID max speed to Sets the correction speed of the motor in position mode.

Set speed point to Sets the motor speed (speed mode).

Run ahead Moves forward to a specific position.

Set Servo angle to Sets the servo angle.

Set Servo pulse to Sets the servo pulse width.


Sets the motor to run at a speed of 50 for 1000 steps.

BaseX Usage


Feature Description

Reads the encoder

PLUS Module

Get encode Reads the encoder value.

Clean encode Resets the encoder value to zero.

Get press Reads if the encoder button is pressed.


Displays the encoder status.

PLUS Usage


Feature Description

Controls DC motors and servos as well as reads analog and digital values

GoPlus Module

Set servo angle Sets the servo angle.

Set motor speed Sets the motor speed.

Digital read pos Reads the digital value from a specified pin.

Analog read Reads the analog value from a specified port.


Reads digital and analog values, controls servos and motors.

GoPlus Usage


Feature Description

Retrieves GPS information

GPS Module

get time Retrieves local time.

get latitude Retrieves latitude.

get longitude Retrieves longitude.

get satellite num Retrieves the number of satellites found.

get positioning quality Retrieves positioning accuracy.

get speed Retrieves ground speed.

get course Retrieves the geographic North Pole position.

set time zone Sets the local timezone.


Displays GPS-related information on the screen.

GPS Usage

On This Page