Welcome to RDK X5 Board repository
2. RGB Strip
OpenClaw RGB Light Control Tutorial
Before starting, please complete [01-Peripheral Hardware Configuration], [02-OpenClaw API-KEY Configuration], [03-OpenClaw Model Switching], [04-OpenClaw Prompts], [05-AI Voice Interaction Configuration], and [06-Three Conversation Scheme Configuration and Testing] in the
Preparation for Usedirectory. If you are currently only using TUI / WhatsApp, you can skip05for now. This document assumes the basic environment is already prepared and only expands on RGB-related content.
1. Tutorial Objectives
This tutorial demonstrates OpenClaw's natural language control capabilities through RGB light peripherals. After completing this tutorial, readers will be able to:
- Understand the basic idea of OpenClaw controlling RGB lights
- Interact with OpenClaw via three methods: WhatsApp, TUI, and voice code
- Complete four RGB cases: single color lighting, breathing light, warning flash, rainbow marquee
- Understand the complete pipeline from "user input" to "light execution"
2. Hardware Preparation
- OpenClaw main board
- RGB light strip / RGB LED module
[Default 14 WS2812 LEDs] [Optional] Microphone module- Wiring diagram

You can add RGB wiring diagrams and hardware photos here.
3. Software Preparation
Code entry points used in the tutorial:
- Low-level driver code:
/home/sunrise/hardware_hal_demo/ - RGB control command:
/home/sunrise/hardware_hal_demo/rgb - Voice entry point:
/home/sunrise/voice_to_openclaw/src/main.py
The rgb tool already supports the following capabilities:
- Set fixed color
color - Set light effect
effect - Turn off lights
off
Current common light effects include:
breatheBreathing lightblinkFlashingflowFlowing lightmarqueeMarquee lightrainbowRainbow light
If you want to verify the underlying RGB commands separately, you can also enter the following content in the terminal:
rgb color --color red # All turn redrgb effect --effect breathe --color blue --speed 5 # Breathing lightrgb off # Turn off lightsFor more commands, you can check the md documents in this folder:
xxxxxxxxxx/home/sunrise/hardware_hal_demo/README.mdIf the low-level commands can be executed normally, it means the hardware connection and communication with the RDK X5 motherboard are normal.
4. Testing RGB Lights
Before starting this tutorial, please complete a basic openclaw tui conversation self-check first; if you haven't done so, see [06-Three Conversation Scheme Configuration and Testing]. After confirming that OpenClaw can respond normally, proceed to the RGB-specific test.
Enter the following command in the terminal to enter TUI:
xxxxxxxxxxopenclaw tui
You can try entering the following content in the terminal:
- Set all RGB lights to red
- Change RGB lights to blue
- Lower the brightness of RGB lights a bit
- Turn off RGB lights

If you want to test a specific LED, you can also try entering content like the following:
- Set the 1st LED to green
- Set the 5th LED to purple
5. Three Schemes for Conversing with OpenClaw
| Scheme | Suitable Scenarios | Advantages | Suggested Positioning |
|---|---|---|---|
| Remote control, classroom demonstration | Easy access, suitable for multi-user experience | Demonstrate "remote natural language control" | |
| TUI | Local debugging, command verification | Most direct, easiest to troubleshoot | Get the control pipeline running first |
| Voice Code | Voice interaction, complete AI experience | Closest to real conversation experience | As the final demonstration scheme |
If you have selected the AI voice module + speaker, Feishu dialogue, tui, and WhatsApp dialogue need to broadcast the content of openclaw's reply. You can run the following program on the terminal. The AI voice module dialogue does not need to be run repeatedly
- Modify whether to enable broadcast parameter
xxxxxxxxxx/home/sunrise/voice_to_openclaw/.env
xxxxxxxxxxENABLE_TTS=true # This parameter controls whether to broadcast. After modifying and saving, run the following program in the terminal.- Enter in terminal:
xxxxxxxxxxcd ~/voice_to_openclawsource .venv/bin/activatepython -m src.openclaw_session_tts
5.1 WhatsApp Scheme
For WhatsApp access steps, please refer directly to [06-Three Conversation Scheme Configuration and Testing]. This section only retains conversation examples suitable for the RGB tutorial.
After creation, you can converse directly, for example:
- Change the light strip to blue
- Turn on rainbow light effect
- Make the lights flash faster

5.2 TUI Scheme
If you have completed the TUI self-check in Part 6, you can continue the conversation by entering the following command in the terminal:
xxxxxxxxxxopenclaw tui
5.3 Voice Code Scheme
xxxxxxxxxxRequires selection of AI voice interaction module + speaker
For voice module installation, environment configuration, and basic wake-up process, please refer directly to [04-AI Voice Interaction Configuration].
xxxxxxxxxxcd /home/sunrise/voice_to_openclawsource .venv/bin/activatepython -m src.main
After wake-up, you can directly speak control content, for example:
- Change the lights to red
- Turn on blue breathing light
- Make the lights flow like a rainbow

6. Comprehensive Cases
Note: The following are conversation demonstrations conducted via openclaw tui. You can also choose WhatsApp or voice methods to complete them.
6.1 Case 1: Single Color Lighting
Experiment Objective
Let the RGB lights stably display a certain fixed color to complete the most basic light control.
Effect Description
After receiving the instruction, all LEDs of the RGB lights uniformly display the specified color, such as red, green, blue, white, or warm white. This case is suitable for verifying if color mapping is normal.
Example Instructions
- Set all RGB lights to red
- Change the light strip to blue
- Change the lights to warm white
6.2 Case 2: Breathing Light
Experiment Objective
Let the RGB lights perform brightness gradient on a certain color, forming a breathing light effect.
Effect Description
The RGB lights will cycle from dark to bright and then from bright to dark. The overall effect is relatively soft, suitable for standby prompts, atmosphere lights, or status indicator lights.
Example Instructions
- Turn on blue breathing light
- Change the lights to green breathing effect
- Slow down the breathing light speed a bit
6.3 Case 3: Warning Flash
Experiment Objective
Let the RGB lights simulate warning lights or alarm prompt effects through rapid flashing.
Effect Description
The lights can flash rapidly using red, yellow, or alternating red and blue, suitable for expressing information such as "attention," "warning," or "abnormal status," making the visual feedback more obvious.
Example Instructions
- Make the lights flash red
- Turn on yellow warning light
- Make the RGB lights flash quickly three times
6.4 Case 4: Rainbow Marquee
Experiment Objective
Let the RGB lights form a continuous flowing dynamic effect to showcase richer light performance.
Effect Description
The LED colors will change sequentially and flow forward, looking like rainbow flowing lights or marquee lights. This effect is very suitable for boot animations, display animations, or interactive light effects.
Example Instructions
- Turn on rainbow light effect
- Make the lights flow like a marquee
- Turn on blue flowing light, faster speed