Skip to content

feat: add ESP32-C3 MicroClaw port - #12

Open
Jorel97 wants to merge 2 commits into
Clawland-AI:mainfrom
Jorel97:codex/esp32-c3-port
Open

feat: add ESP32-C3 MicroClaw port#12
Jorel97 wants to merge 2 commits into
Clawland-AI:mainfrom
Jorel97:codex/esp32-c3-port

Conversation

@Jorel97

@Jorel97 Jorel97 commented May 31, 2026

Copy link
Copy Markdown

Fixes #13.

/claim #13
Bounty board submission for the MicroClaw ESP32 Port ($350).

Covers #1, #2, #3, #4, and #5 with one integrated ESP32-C3 firmware port, while keeping a classic ESP32 PlatformIO environment buildable for the bounty's compatibility requirement.

Summary

  • configure PlatformIO for ESP32-C3 DevKitM-1 and ESP32 Dev Module with MQTT, DHT22, battery, sleep, and OTA build flags
  • add a configurable DHT22 driver with explicit failed-read handling and PicoClaw-compatible JSON output
  • add retained MQTT status, sensor, warning, and critical alert topics under clawland/{node_id}/...
  • add ADC battery monitoring, low-battery alerts, and configurable deep sleep wake cycles
  • add ArduinoOTA maintenance window on every wake for field firmware updates
  • add wiring guide for DHT22, DS18B20, PIR, relay, and battery sense pins
  • add MQTT telemetry contract documentation and a dependency-free validation script for structure checks when ESP32 hardware is unavailable

Validation

  • node scripts/validate-esp32-port.mjs
  • node --check scripts/validate-esp32-port.mjs
  • git diff --check
  • platformio run -e esp32c3 succeeded
    • RAM: 43,404 bytes / 327,680 bytes (13.2%)
    • Flash: 800,670 bytes / 1,310,720 bytes (61.1%)
  • platformio run -e esp32 succeeded
    • RAM: 49,200 bytes / 327,680 bytes (15.0%)
    • Flash: 809,045 bytes / 1,310,720 bytes (61.7%)

Hardware behavior is not claimed as hardware-tested until run on a physical board.

Bounty board reference: https://clawland.ai/pages/bounty

@Jorel97

Jorel97 commented Jun 1, 2026

Copy link
Copy Markdown
Author

Maintenance verification after competitor activity on the bounty thread:

  • node scripts/validate-esp32-port.mjs -> passed
  • node --check scripts/validate-esp32-port.mjs -> passed
  • platformio run -e esp32c3 -> passed
    • RAM: 43,404 bytes / 327,680 bytes (13.2%)
    • Flash: 799,486 bytes / 1,310,720 bytes (61.0%)
  • git diff --check -> passed

I also updated the PR body from Refs #13 to Fixes #13 so the $350 bounty issue association is explicit.

@Jorel97

Jorel97 commented Jun 1, 2026

Copy link
Copy Markdown
Author

Follow-up update to keep this aligned with the bounty text and easier to review:

  • added a classic esp32 PlatformIO environment alongside esp32c3, so the existing ESP32 dev target remains buildable
  • added retained lifecycle status telemetry on clawland/{node_id}/status
  • documented the MQTT topic/payload contract in docs/telemetry-contract.md
  • extended the local validator to require the ESP32 environment and telemetry contract

Validation rerun:

  • node scripts/validate-esp32-port.mjs
  • node --check scripts/validate-esp32-port.mjs
  • git diff --check
  • platformio run -e esp32c3 succeeded: RAM 43,404 / 327,680 bytes (13.2%), flash 800,670 / 1,310,720 bytes (61.1%)
  • platformio run -e esp32 succeeded: RAM 49,200 / 327,680 bytes (15.0%), flash 809,045 / 1,310,720 bytes (61.7%)

Still not claiming physical hardware validation; this is compile- and structure-validated pending board testing.

@LuuOW LuuOW left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technical audit: code patterns and architectural layout verified for system reliability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bounty: MicroClaw ESP32-C3 port

2 participants