2.2 KiB
P08 — Arduino debt burn-down
STATUS: DONE
DEPENDS: P06 (behaviour parity). P07 optional.
READ: this file, components/hal_motor/**, HAL headers from P03
OUT: recipe edits; UI redesign; LVGL-by-default
FORBIDDEN: behaviour change of times/stop/resume; dropping cooperative stop
IN
Replace Arduino libs with IDF peripherals behind the same HAL. Remove Arduino-as-component from the S3 image first, then WROOM.
Order (one commit each, tests+builds green after each):
- Audio: LEDC /
ledc_timertones; deletetone(). - Motor: RMT TX pulse train for STEP, GPIO DIR/EN.
hal_motor_request_stopaborts RMT + EN HIGH. Delete AccelStepper. Same 4800 steps/rev, 60 RPM, accel ≈9600 (RMT may use a short ramp table). - Temp: RMT or
onewire_busIDF component; keep +0.4 °C offset. Delete Dallas/OneWire Arduino. - Keypad: GPIO matrix scan in
hal_input(no Keypad lib). Same keymap. - LCD 2004: IDF I2C + HD44780 nibble commands (or
esp_lcdpanel io i2c). Delete LiquidCrystal_I2C. - Drop
espressif/arduino-esp32fromidf_component.ymlwhen nothing includes Arduino.h.
Do not change hal_* public headers except adding RMT-specific internals in .c.
VERIFY
Host tests pass (stubs unchanged).
Both boards build without Arduino component.
Hardware WROOM: Custom 10 s, Esc mid-step EN off, Resume remaining, temp display, beep Stop/Resume, complete alarm cancellable.
COMMITS
Per numbered item above, e.g. Replace AccelStepper with RMT step pulse HAL.
DoD
rg -n "Arduino.h|AccelStepper|LiquidCrystal|DallasTemperature|#include <Keypad.h>|#include <OneWire.h>"empty inmain/and livecomponents/hal_*/main(vendor copies remain unlinked undercomponents/third_party/)- Stop still EN-off first (
hal_motor_request_stopEN HIGH then RMT abort) - STATUS→DONE
Notes: audio was already LEDC; converted to C. Motor RMT copy-encoder batches + short accel table. Temp espressif/onewire_bus + skip-ROM scratchpad, +0.4 °C. Keypad GPIO scan, same 5x4 map. LCD PCF8574 nibble HD44780 on I2C0. Dropped espressif/arduino-esp32 and initArduino(). Host ctest green. Local idf.py not run (no IDF_PATH). Hw unflashed.