1. joystick[AXIS]

Bluetooth controller - 图1

Reports the output value of the specified joystick at the specified axis

How to Use

Bluetooth Controller is a device for controlling mBlock sprites or robots with built-in Bluetooth modules.
It provides two joysticks. The character L refers to the left joystick, and R refers to the right one.
The joysticks can be used to control the motion of robots or sprites. The following figure shows the axes and the relationship between manipulation directions and output values.
Bluetooth controller - 图2
Output value range at the X axis: –255 to +255
Output value range at the Y axis: –255 to +255
Note: This is a reporter block that must be used in combiantion with another block requiring data. It cannot be used independently.

Example

Bluetooth controller - 图3
Note: You need to add the Bluetooth Controller extension for mBot and used the related blocks when writing this program. Ensure that you have uploaded the program to mBot and connected mBot to Bluetooth Controller through Bluetooth.
After starting mBot, move the left and right joysticks at the Y axis to control the moving power of the left and right wheels of mBot.


2. button [AXIS] pressed

Bluetooth controller - 图4

Determines whether the specified key on Bluetooth Controller is pressed

How to Use

Bluetooth Controller provides 15 keys. Click to select the one to be programmed.
Note: This is a Boolean block that contains a condition. Use it in combination with another block that requires a condition.

Example

Bluetooth controller - 图5
Note: Ensure that you have uploaded the program to mBot and connected it to Bluetooth Controller through Bluetooth.
After you start mBot, it moves forward if you press button ↑.