pdf-icon

LoRaWAN

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).

Usage

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

LoRaWAN Usage

STEPMOTOR

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.

Usage

Alternating forward and reverse motor operation.

Stepper Motor Usage

SERVO

Feature Description

Servo control.

Servo Control

Set servo rotate Set a specified servo angle.

Set servo write us Set servo pulse time.

Usage

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.

Usage

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)

Bala

Feature Description

Control Bala operation.

Bala

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.

Usage

Bala moves forward 500 pulses and turns 45 degrees.

Bala Usage

DC_MOTOR

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.

Usage

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

DC Motor Usage

PM2.5

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.

Usage

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

PM2.5 Usage

BaseX

Feature Description

BaseX

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.

Usage

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

BaseX Usage

PLUS

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.

Usage

Displays the encoder status.

PLUS Usage

GoPlus

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.

Usage

Reads digital and analog values, controls servos and motors.

GoPlus Usage

GPS

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.

Usage

Displays GPS-related information on the screen.

GPS Usage

On This Page