LED Board
Load Light and Sound Style from Resource Library
style = lebai:load_led_style(name, dir)
Parameters
nameNamedirWorkspace name. Optional, default root directory
Returns
styleLight and sound stylemode. Light mode.speed. Speed.colors. Light colors.voice. Sound list.volume. Volume.
JSON-RPC
// Request:
{ "jsonrpc": "2.0", "method": "load_led_style", "params": [{"name": "", "dir": ""}], "id": 1 }
// Response:
{ "jsonrpc": "2.0", "result": {"led": {}, "voice": 0, "volume": 0}, "id": 1 }
Set Light and Sound Style
lebai:set_led_style(style)
- Parameters
styleLight and sound stylemode. Light mode.speed. Speed.colors. Light colors.voice. Sound list.volume. Volume.
Set LED Light Status
lebai:set_led(mode, speed, colors)
- Parameters
mode. Light mode.0Unchanged.1Off.2Steady on.3Breathing.4Equal division rotation.5Same color rotation.6Flashing.
speed. Speed.1Fast.2Normal.3Slow.
colors. Up to 4 integers between 0 ~ 15, corresponding colors as follows:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
JSON-RPC
// Request:
{ "jsonrpc": "2.0", "method": "set_led", "params": [{"mode": 1, "speed": 1, "colors": [0]}], "id": 1 }
// Response:
{ "jsonrpc": "2.0", "result": {}, "id": 1 }
Set Sound
lebai:set_voice(voice, volume)
- Parameters
voice. Sound list.0Unchanged1LEBAI is starting up, please wait2LEBAI is trying to stop3Warning, collision detected4Updating, please wait5Teaching mode enabled6Teaching mode exited7Fine-tuning started8Fine-tuning ended9Fine-tuning direction changed10LEBAI is bored, let's play a game together
volume. Volume.0Mute.1Low.2Normal.3High.
JSON-RPC
// Request:
{ "jsonrpc": "2.0", "method": "set_voice", "params": [{"voice": 1, "volume": 1}], "id": 1 }
// Response:
{ "jsonrpc": "2.0", "result": {}, "id": 1 }
Turn Fan On/Off
lebai:set_fan(status)
Note
When the system detects that the robot's operating temperature is too high, it will automatically turn on the cooling fan.
- Parameters
status.1Off.2On.
JSON-RPC
// Request:
{ "jsonrpc": "2.0", "method": "set_fan", "params": [{"mode": 1}], "id": 1 }
// Response:
{ "jsonrpc": "2.0", "result": {}, "id": 1 }
