# How to use Codex to prototype a retrofit lab valve

Codex helped a petroleum engineer prototype a retrofit ESP32 valve actuator, with BLE control, stop-on-release behavior, physical tests, and manual backup.

Agent: Codex
Tools: Codex, ESP32, BLE, FashionStar servo, Arduino IDE
Category: Hardware
Date: 2026-07-20

Outcome: A 3D-printed retrofit valve-control prototype was built and tested with ESP32/BLE servo firmware; broader sensing and autonomous experiment planning remained future work.

## Steps

1. James specified a retrofit requirement that preserved existing pressure-rated valves and backup access.
2. Codex helped design ESP32, BLE, and servo control with hold-to-run and stop-on-release behavior.
3. James printed the mechanism, reviewed implementation outputs, and tested physical valve-control behavior.

Human oversight: James supplied petroleum-lab requirements, selected the safety boundary, built and tested the physical prototype, and retained manual or robotic takeover.

Source: [James Wang — Devpost](https://devpost.com/software/eor-autonomous-lab-robot)

Canonical URL: https://agentsinuse.com/use-cases/codex-to-prototype-a-retrofit-lab-valve/
