Copy and paste this into Claude CLI to start:
I need you to build the Triton RC submarine controller firmware. This is a Raspberry Pi Pico project.
First, read these files to understand the project:
- Read
CLAUDE.mdfor coding rules and project overview - Read
references/pinout.mdfor GPIO assignments - Read
references/types.mdfor data types
Then execute these tasks IN ORDER. Complete each fully before moving to the next:
- F1: Run
python3 scripts/init_project.py .to create project structure - F2: Create
src/main.cwith a simple LED blink to verify toolchain works - F3: Modify main.c for dual-core - Core 0 blinks LED, Core 1 prints to serial
- F4: Create
src/config.hwith all pin definitions fromreferences/pinout.md - F5: Create
src/types.hwith all types fromreferences/types.md
- D1:
src/drivers/rc_input.c- PIO-based RC PWM capture - D2:
src/drivers/pressure_sensor.c- MS5837 I2C driver - D3:
src/drivers/imu.c- MPU-6050 I2C driver - D4:
src/drivers/pump.c- PWM motor control via L298N - D5:
src/drivers/valve.c- GPIO solenoid control - D6:
src/drivers/servo.c- PWM servo output - D7:
src/drivers/battery.c- ADC voltage monitor - D8:
src/drivers/leak.c- GPIO leak detection
- C1:
src/control/pid.c- Generic PID controller - C2:
src/control/depth_ctrl.c- Depth hold using PID - C3:
src/control/pitch_ctrl.c- Pitch stabilization using PID - C4:
src/control/ballast_ctrl.c- Ballast state machine - C5:
src/control/state_machine.c- Main operational states
- S1:
src/safety/safety_monitor.c- Core 0 fault detection at 100Hz - S2:
src/safety/emergency.c- Emergency blow sequence - S3: Add watchdog to safety_monitor.c
- S4:
src/util/log.c- Event logging
- I1: Wire up all sensors in main.c, verify readings
- I2: Wire up control loops, test depth/pitch hold
- I3: Wire up safety system, test fault triggers
- I4: Full integration - everything running together
After each task:
- Run
python3 ci/p10_check.py src/to verify Power of 10 compliance - Fix any violations before proceeding
- Tell me what you completed and what's next
Rules you must follow:
- No malloc/free - static allocation only
- All functions under 60 lines
- P10_ASSERT() for all preconditions
- Check all return values
- Follow patterns in
references/exactly
Start with F1 now.
When you paste this into Claude CLI:
- Claude reads all the reference files
- Claude executes F1 (init_project.py)
- Claude creates the blink test (F2)
- Claude proceeds through each task in order
- Claude validates P10 compliance after each step
- Claude reports progress and moves to next task
If you want more control, just paste the "Phase 1" section and tell Claude to start. When done, paste Phase 2, etc.