LED Board

Set LED Lights auto_sync

Sets LED board lights.

  • Function: set_led from the lua module
  • Parameters:
    1. mode: [int] Light mode:
      • 0 No change.
      • 1 Off.
      • 2 Constant on.
      • 3 Breathing.
      • 4 Even rotation.
      • 5 Same color rotation.
      • 6 Flashing.
    2. speed: [int] Speed:
      • 1 Fast.
      • 2 Normal.
      • 3 Slow.
    3. colors: [list[int]] Up to 4 integers between 0~15, corresponding to colors as follows:
  • 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_voice from the lua module
  • Parameters:
    1. voice: [int] Sound list:
      • 0 No change
      • 1 Xiao Bai starting up, please wait
      • 2 Xiao Bai trying to stop
      • 3 Warning, collision detected
      • 4 Updating, please wait
      • 5 Teaching mode enabled
      • 6 Teaching mode exited
      • 7 Fine-tuning started
      • 8 Fine-tuning ended
      • 9 Fine-tuning direction changed
      • 10 Xiao Bai is bored, let's play a game
    2. volume: [int] Volume:
      • 0 Mute.
      • 1 Low.
      • 2 Normal.
      • 3 High.
  • 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_fan from the lua module
  • Parameters:
    1. status: [int] Fan status:
      • 1 Off.
      • 2 On.
  • Returns: [bool] Whether executed successfully

Example

set_fan(2)