Welcome to Jetson Orin NANO Developer Kit repository
4. AI Pet
OpenClaw AI Pet Tutorial
Before starting, please complete 01-Hardware Configuration, 02-openclaw API-KEY Configuration, 03-openclaw Model Switching, 04-AI Voice Interaction Configuration, 05-Three Dialogue Solution Configuration Tests under the
Prerequisitesdirectory. If you are currently only using TUI / whatsapp, you can skip04for now. This article assumes the basic environment has been prepared and only expands on the AI pet project itself.
1. Tutorial Objectives
This article demonstrates OpenClaw's interaction capability as a desktop AI pet through the combination of "action + light + screen + dialogue". After completing this tutorial, readers can:
Understand how to make an AI pet with emotional feedback using servos, RGB, and OLED
Communicate with OpenClaw through three methods: whatsapp, TUI, and voice code
Complete four project scenarios: greeting, emotional expression, companionship Q&A, sleep and wake-up
2. Hardware Preparation
OpenClaw mainboard
Servo
[Recommended at least 1]RGB light strip / RGB light bead module
OLED display
[Optional] AI voice module + speakerWiring diagram

3. Software Preparation
Code entry points that will be used in the tutorial
Servo control command:
/home/jetson/hardware_hal_demo/cli/servoVoice entry:
/home/jetson/voice_to_openclaw/src/main.py
This project does not have a fixed set of "pet scripts", but lets OpenClaw orchestrate several basic peripheral actions:
Servo is responsible for nodding, shaking head, swinging
RGB is responsible for expressing mood and status
OLED is responsible for displaying name, expressions, or short text
Voice dialogue is responsible for making the pet more like an interactive character
4. Test Project Basic Capabilities
Before starting this project, please complete one openclaw tui basic dialogue self-check; if you haven't done it yet, see 05-Three Dialogue Solution Configuration Tests. After passing, enter AI pet project specific testing.
Enter OpenClaw TUI:
openclaw tui
Then test several basic capabilities separately:
Let the servo nod
Change the light to pink breathing light
Display "Hello" on OLED
5. Three Solutions for Communicating with OpenClaw
| Solution | Suitable Scenarios | Advantages | Recommended Positioning |
|---|---|---|---|
| Remote interaction, classroom demonstrations | Suitable for demonstrating "remote pet raising" | Demonstrate character interaction capability | |
| TUI | Local debugging, action verification | Easiest to check if actions and feedback match | First run through character action logic |
| Voice code | Final interaction experience | Most like a real talking desktop pet | As final demonstration solution |
If optional AI voice module + speaker are selected, whatsapp dialogue, tui, whatsapp dialogue need to broadcast OpenClaw's reply content. You can run the following program in terminal. AI voice module dialogue does not need to run repeatedly
Modify whether to enable broadcast parameter
xxxxxxxxxx/home/jetson/voice_to_openclaw/.env
xxxxxxxxxxENABLE_TTS=true #This parameter controls whether to broadcast. After modification and saving, run the following program in terminalTerminal input
xxxxxxxxxxcd ~/voice_to_openclawsource .venv/bin/activatepython -m src.openclaw_session_tts
5.1 whatsapp Solution
For whatsapp connection and robot creation steps, please directly refer to 05-Three Dialogue Solution Configuration Tests. After creation, you can remotely interact with the AI pet in whatsapp, for example:
Take a photo to see if there is dog food. If yes, display smile expression on OLED,make servo dance,and light up ambient lights on OLED. If no dog food,display sad expression on OLED.

5.2 TUI Solution
If you have completed the TUI self-check in Chapter 0, directly enter terminal text dialogue:
xxxxxxxxxxopenclaw tuiThen enter project-related commands, for example:
Take a photo to see if there is dog food. If yes, display smile expression on OLED, make servo dance, and Light up ambient Lights on OLED. If no dog food, all servos shake heads simultaneously.

5.3 Voice Code Solution
xxxxxxxxxxRequires optional AI voice interaction module + speaker
For voice module installation, environment configuration, and basic wake-up process, please directly refer to 04-AI Voice Interaction Configuration. After waking up, you can directly say control content, for example:
Take a photo to see if there is dog food. if yes display smile expression on OLED, if no dog food display sad expression.

6. Project Implementation
Note: The following are all dialogue demonstrations using openclaw tui method. You can also choose whatsapp or voice method to complete.
6.1 Scenario One: Greeting
Experimental Objective
Let the AI pet make action and text feedback when the user sends a greeting.
Effect Description
The servo can make a simple nodding or head-turning action, OLED displays welcome text, RGB lights up soft colors. This way, the feeling of the pet "appearing" will be very obvious.
Example Instructions
Let the little pet greet me
Let the pet welcome me
6.2 Scenario Two: Emotional Expression
Experimental Objective
Let the AI pet express states like happy, quiet, angry, sleepy using lights and screen.
Effect Description
This scenario is most suitable for reflecting "character sense". For example, when happy, light warm breathing light; when sleepy, light blue dim light; when quiet, only display brief status.
Example Instructions
Let the pet enter happy state
Draw simple expressions on OLED
6.3 Scenario Three: Companionship Q&A
Experimental Objective
Let the AI pet not only move, but also respond to questions like a desktop companion character.
Effect Description
OpenClaw can first complete the dialogue, then combine servo nodding, shaking head and screen text to make "speaking" and "action" happen simultaneously, looking more like a character with personality.
Example Instructions
First answer my question, then nod
If you agree, express with actions
Chat with me about today's mood
6.4 Scenario Four: Sleep and Wake-up
Experimental Objective
Let the AI pet have the ability to switch between standby, sleep, and wake-up states.
Effect Description
In sleep mode, most lights can be turned off, keeping only low-brightness state; when waking up, restore lights, screen, and action feedback, making the project more complete.
Example Instructions
Let the pet enter sleep mode
Wake up the pet