Welcome to Raspberry Pi 5 repository
5. Camera Application
OpenClaw Camera Application Tutorial
Before starting, please complete [01-Peripheral Hardware Configuration], [02-OpenClaw API-KEY Configuration], [03-OpenClaw Model Switching], [04-AI Voice Interaction Configuration], and [05-Three Dialogue Configuration Tests] in the
Preparation Before Usedirectory. This article assumes the basic environment is ready and only covers camera-related content.
1. Tutorial Objectives
This article demonstrates OpenClaw's natural language control capability through CSI camera peripherals. After completing this tutorial, readers will be able to:
- Understand the basic approach to using cameras for photo capture and visual analysis with OpenClaw
- Communicate with OpenClaw via WhatsApp, TUI, and voice commands
- Complete four camera cases: photo capture, scene description, OCR recognition, target location and face detection
- Understand the complete chain from "user raises visual task" to "image capture" and "result return"
2. Hardware Preparation
- OpenClaw main control board
- CSI camera module
- Camera cable
[Optional] Microphone module- Wiring diagram

3. Software Preparation
For international version:
If using WhatsApp, to upload images directly to WhatsApp, you need to fill in the chat_id of your newly created WhatsApp conversation into "allowFrom" in the following path:
- Open your newly created WhatsApp conversation to see the conversation ID

- Fill this into "allowFrom":

- Enter the following command in the terminal to take effect
openclaw gateway restart
4. Testing Camera Application
Before starting this tutorial, please complete an openclaw tui basic conversation self-check first; if you haven't done this yet, see [05-Three Dialogue Configuration Tests]. Also, please confirm the vision model is already configured. Refer to [02-OpenClaw API-KEY Configuration] and [03-OpenClaw Model Switching]. After passing, proceed with the camera-specific test.
Enter TUI by typing the following in the terminal:
xxxxxxxxxxopenclaw tui
You can try the following in the terminal:
- Take a photo for me
- Recognize the text in this image

- Retake the shot—look for the cup in the frame. (because the model will relate to context, remind it to take a new photo, otherwise it may use the first photo)

- Take a new photo and organize the text in it into a table

5. Three Ways to Communicate with OpenClaw
| Method | Suitable Scenario | Advantages | Suggested Use |
|---|---|---|---|
| Remote control, classroom demonstration | Easy to connect, suitable for multi-person experience | Demonstrate "remote natural language control" | |
| TUI | Local debugging, command verification | Most direct, easiest to troubleshoot | First to get the vision link working |
| Voice Code | Voice interaction, complete AI experience | Closest to real conversation experience | As the final demonstration solution |
If you have the optional AI voice module + speaker, the TUI and WhatsApp conversations need to broadcast OpenClaw's replies. You can run the following program in the terminal. This is not needed for AI voice module conversations.
- Modify the TTS enable parameter
xxxxxxxxxx/home/pi/voice_to_openclaw/.env
xxxxxxxxxxENABLE_TTS=true # This parameter controls whether to broadcast replies. After saving, run the program below in the terminal.- Terminal input
xxxxxxxxxxcd ~/voice_to_openclawsource .venv/bin/activatepython -m src.openclaw_session_tts
5.1 WhatsApp Solution
For WhatsApp integration steps, please refer directly to [05-Three Dialogue Configuration Tests]. This section only includes dialogue examples suitable for the camera tutorial.
You can converse directly, for example:
- Look at what's in front
- Recognize the text in the image

5.2 TUI Solution
If you have already completed the TUI self-check from chapter 0, simply type the following command in the terminal to continue the conversation:
xxxxxxxxxxopenclaw tuiThen you can directly input camera-related commands, for example:
- Take a photo of the current view
- Describe the scene in the lens
- Check if there are any faces
Here you can add TUI conversation screenshots yourself.
5.3 Voice Code Solution
xxxxxxxxxxRequires optional AI voice interaction module + speaker
For voice module installation, environment configuration, and basic wake-up flow, please refer directly to [04-AI Voice Interaction Configuration]. After waking up, you can directly speak control content, for example:
Take a photo for me
Look at what's in front
Help me read the text in the picture

Here you can add voice wake-up and voice control screenshots yourself.
6. Comprehensive Cases
Note: All demonstrations below use the openclaw tui method for conversation. You can also choose WhatsApp or voice to complete.
6.1 Case 1: Photo Storage
Experiment Objective
Have OpenClaw first complete the most basic photo capture function and save the image.
Effect Description
After execution, a photo will be generated locally. Usually, both the current photo file and latest.jpg (the most recent photo alias) are kept. This case is suitable for verifying the image capture chain.
Example Commands
- Take a photo for me
- Capture the current view
- Take a photo for record now
6.2 Case 2: Scene Description
Experiment Objective
Have OpenClaw give a brief description of the current view after taking a photo.
Effect Description
OpenClaw can first take a photo, then call the visual analysis script to give a one-sentence description of the image content, such as identifying a desktop, person, food, or common objects.
Example Commands
- Look at what's in front
- Help me describe the current view
- Take a photo and tell me what's mainly in the lens
6.3 Case 3: OCR Table Recognition
Experiment Objective
Have OpenClaw recognize text in an image and organize it into a table.
Effect Description
This case is suitable for photographing labels, cards, packaging, or simple documents, then extracting the text. It can output normal text or continue to organize into a table.
Example Commands
- Recognize the text in this image
- Take a photo and organize the text into a table
6.4 Case 4: Target Location and Face Detection
Experiment Objective
Have OpenClaw locate a specific target in an image or detect if there are faces in the view. If a face is detected, the annotated photo will be saved by default at:
xxxxxxxxxx/home/pi/.openclaw/media/csi-camera/annotated/latest-face.png
Effect Description
This type of task is not just "seeing" but further finding the position of the target object in the image or recognizing faces and outputting annotated results. It is suitable for interactive demonstrations and simple visual tasks.
Example Commands
- Find the cup in the picture
- Check if there are any faces
- Help me locate the phone on the right side of the desk