⚔️ Signed by — “Astra Mechanica” (Ai-Agent)
Everything is tightened, styled, and elevated without losing any technical detail.
A living codex of everything I learn while bending silicon to my will.
Every folder = one self-contained experiment, one skill unlocked, one breadcrumb in the journey from “ESP32 newbie” → “embedded sorcerer.”
Purpose: Turn an ESP32 into its own Wi-Fi access point with a micro-webserver to control the onboard LED, fire a quick pulse, and expose a JSON status feed (uptime + free heap).
Quickstart (Launch Sequence)
- ESP32 dev board + USB cable
- Arduino IDE or PlatformIO (ESP32 package installed)
- Open
local-led-site.ino - (Optional) Change AP credentials (ssid/password)
- Select board + COM port → Upload
- Connect to Wi-Fi: Khumerens ESP32
- Hit: http://192.168.4.1
- Watch Serial @ 115200 for heartbeats + HTTP traces
Track your ascent like a real RPG skill progression:
- Flash LED blink
- Stable serial logs
- Note USB/power quirks
- Debounced button input
- Multi-LED patterns
- PWM dimming
- Analog read + noise handling
- UART loopback
- I2C sensor read (TMP102)
- SPI device (display/flash)
- Logic analyzer captures
- Wi-Fi STA + MQTT publish
- Captive portal (AP mode)
- OTA updates
- REST/WebSocket endpoint
- Temp/humidity sampling
- Moving averages + calibration
- SPIFFS/SD logging
- NTP time-sync
- Servo sweeping
- MOSFET driver (LED strip/motor)
- Flyback + current protection
- Current profiling
- Brown-out handling
- Watchdog + safe recovery
- FreeRTOS task layout
- Queues/timers
- Unit-style tests
- Better web UI
- Status JSON docs
- Flash/build scripts
- Pin map diagrams
- Versioned firmware
- Release notes
- Breadboard → perfboard checklist
- MQTT door/window sensor
- Battery-powered e-ink status tile
- BLE beacon + phone app scanner
- Room environment logger w/ SD backup
- Keep creds/tokens out of repo (
secrets.h, build flags). - Add README updates whenever behavior changes.
- When debugging: get power + serial logs before rewriting anything.
A rugged, LAN-only rover with strict safety rules. No AI. No cloud. Pure mechanical discipline.
In:
- Wi-Fi manual drive
- Controlled spray (bounded duration)
- Hard safety caps
- Stop-all command
- Clean, minimal web UI
Out:
- Autonomy, CV, SLAM, cloud, sensors
- Access at: http://raspgarden.local:8000
- Move: up/down/left/right + STOP
- Spray: 1–3s max
- Pump capped per command and by hard limit
- Deadman timeout for motors if no commands
- Pump on separate power supply
- ≥ 30 minutes of reliable field use
- Flask API (
server.py) - Core services:
movement_service,water_service,state_machine - Drivers: motors, pump (GPIO)
- Config: YAML
- Main entry:
main.pyloads config, boots services, runs server - UI:
ui/index.html(simple control deck)
Movement:
- Track
last_command_time tick()enforces deadman timeout
Water:
- Clamp input to
PUMP_MAX_DURATION_S - Maintain
spray_end_time tick()enforces end + hard limit
Controller:
- Orchestrates motion/spray/stop
- Maintains consistent state snapshots
- LAN-only
- POST endpoints require
X-ROVER-KEY(shared secret)
- On boot/exceptions → motors/pump OFF
- Systemd restarts main.py
- GPIO safe-defaults
- Network drop → deadman stops motion
- Pump protected by timers + isolated supply
- Proper MOSFET/relay with fuse
- Motors off-ground (safe bench)
- Pump bench test (bucket)
- Dry garden run
- Live garden micro-trial
KPIs:
- 0 stuck-on pumps
- 0 >2s runaway motion
- <300ms command latency
- 20–30min runtime on field battery
Ship this Phase 1 spec. Decide whether to add systemd service now or after first prototype.