LED Board
Set LED Lights auto_sync
Sets LED board lights.
- Function:
set_ledfrom the lua module - Parameters:
- mode: [int] Light mode:
0No change.1Off.2Constant on.3Breathing.4Even rotation.5Same color rotation.6Flashing.
- speed: [int] Speed:
1Fast.2Normal.3Slow.
- colors: [list[int]] Up to 4 integers between 0~15, corresponding to colors as follows:
- mode: [int] Light mode:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- Returns: [bool] Whether executed successfully
Example
set_led(1, 2, {1, 2, 3, 4})
Set Sound auto_sync
Sets LED board sound.
- Function:
set_voicefrom the lua module - Parameters:
- voice: [int] Sound list:
0No change1Xiao Bai starting up, please wait2Xiao Bai trying to stop3Warning, collision detected4Updating, please wait5Teaching mode enabled6Teaching mode exited7Fine-tuning started8Fine-tuning ended9Fine-tuning direction changed10Xiao Bai is bored, let's play a game
- volume: [int] Volume:
0Mute.1Low.2Normal.3High.
- voice: [int] Sound list:
- Returns: [bool] Whether executed successfully
Example
set_voice(1, 2)
Toggle Fan auto_sync
Toggles the cooling fan.
Note
When the system detects the robot is running at too high a temperature, it will automatically turn on the cooling fan.
- Function:
set_fanfrom the lua module - Parameters:
- status: [int] Fan status:
1Off.2On.
- status: [int] Fan status:
- Returns: [bool] Whether executed successfully
Example
set_fan(2)
