APP Programming Block_Input



Read button pressed status



Return: button pressed / not pressed

Initialization of Touch Sensor Port



Initialize the infrared sensor port and read infrared sensors


Port Parameter:Port3,Port5,Port7,Port8

infrared sensor IR1:IR2 Parameter:0:0,0:1,1:0,1:1

0 means undetected , 1 means detected

Read the compass toward(0~360°)


Return: The compass faces the angle

Read acceleration value(1024/g)


Parameter:X direction, y direction, Z direction, strength value

Return: Acceleration value

Reading rotation angle(°)


Parameters: pitch (x), roll (y), read the main control tilt angle

Return: Angle value(-180°~+180°)

Read thermometer values


Return: Temperature value

Read IMU actions


Parameters: vibration, free falling, X-axis up, X-axis down, Y-axis up, Y-axis down, Z-axis up, Z-axis down, 3g, 6g, 8g

Calibration compass


Compass calibration module, the main control in calibration needs to be flipped in the shape of ”∞“