一键导入
dual-controller-sync
Debug and synchronize communication between the robocar main controller (Heltec WiFi LoRa 32) and camera module (ESP32-CAM)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Debug and synchronize communication between the robocar main controller (Heltec WiFi LoRa 32) and camera module (ESP32-CAM)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Debug static, hiss, or noise on embedded I2S audio (ESP32 + MAX98357A / PCM DACs), especially streamed PCM. Measure the signal at each pipeline stage instead of guessing at the amp. Use when audio plays but sounds wrong.
Generate a printable Typst build guide (source + PDF) for an ESP32/MCU project by analyzing its docs, source, and schematic
Register a project in the monorepo — justfile mod, CI matrix, standard file inventory
Standardize credential handling for an ESP32 project (credentials.h.example, .gitignore, pre-commit protection)
Set up ESP-IDF development environment, create new projects, and verify configuration
Generate a CLAUDE.md for a project with build commands, hardware constraints, architecture, and development tasks
| name | dual-controller-sync |
| description | Debug and synchronize communication between the robocar main controller (Heltec WiFi LoRa 32) and camera module (ESP32-CAM) |
| user-invocable | false |
Apply this skill when the user:
┌─────────────────────┐ I2C ┌─────────────────────┐
│ Main Controller │◄────────────►│ Camera Module │
│ Heltec WiFi LoRa │ │ ESP32-CAM │
│ │ │ │
│ - AI decisions │ │ - Image capture │
│ - Motor control │ │ - Vision analysis │
│ - LoRa comms │ │ - I2C slave │
└─────────────────────┘ └─────────────────────┘
# Build main controller
just robocar::build-main
# Build camera module
just robocar::build-cam
# Or build both
just robocar::build-all
Open two terminals and monitor both:
Terminal 1 - Main Controller:
just robocar::monitor-main PORT=/dev/cu.usbserial-0001
Terminal 2 - Camera Module:
just robocar::monitor-cam PORT=/dev/cu.usbserial-0002
If unsure which device is which:
ls -la /dev/cu.usbserial-* /dev/ttyUSB*
Look for:
| Symptom | Possible Cause | Solution |
|---|---|---|
| No response | Wrong address | Verify 7-bit address format |
| Timeout | Missing pull-ups | Add 4.7K resistors on SDA/SCL |
| Corrupted data | Speed too fast | Reduce I2C clock frequency |
| Intermittent | Loose connection | Check wiring |
Ensure both controllers use the same address:
Main controller (master):
#define CAMERA_I2C_ADDR 0x55 // 7-bit address
Camera module (slave):
#define I2C_SLAVE_ADDR 0x55 // Must match master
Main Controller Camera Module
SDA (21) ◄──────────► SDA (GPIO)
SCL (22) ◄──────────► SCL (GPIO)
GND ◄──────────► GND
Pull-up resistors (4.7K) on SDA and SCL to 3.3V.
Enable verbose I2C logging in both projects:
esp_log_level_set("i2c", ESP_LOG_DEBUG);
Look for matching transactions:
If commands arrive too fast:
Add delay between commands:
i2c_master_cmd_begin(I2C_NUM, cmd, pdMS_TO_TICKS(100));
vTaskDelay(pdMS_TO_TICKS(10)); // Wait for slave to process
# Flash main controller first
just robocar::flash-main PORT=/dev/cu.usbserial-0001
# Then flash camera (requires GPIO0 to GND)
# Connect GPIO0 to GND on ESP32-CAM
just robocar::flash-cam PORT=/dev/cu.usbserial-0002
# Disconnect GPIO0 from GND and reset
For rapid iteration:
just robocar::build-alljust robocar::flash-mainjust robocar::flash-camSymptoms:
Debug Steps:
Symptoms:
Debug Steps:
Symptoms:
Debug Steps:
# Show system info
just robocar::info
# Check environment
make check-environment
# Clean and rebuild
just robocar::clean-all
just robocar::build-all
# Full dev cycle for main
just robocar::develop-main PORT=/dev/xxx
# Full dev cycle for camera
just robocar::develop-cam PORT=/dev/xxx