Add board input driver for button and LiPo ADC logging.
TODO: Hardware pinning in powerpod.h (TASTER_GPIO, V_LIPO_1/2_GPIO) does not match final hardware yet — verify against schematic before production. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+8
-1
@@ -51,6 +51,11 @@ Pins (`powerpod.h`):
|
||||
| UART RX | 2 |
|
||||
| LED ring | 7 |
|
||||
| BMA456 INT | 10 |
|
||||
| Button (Taster) | 12 |
|
||||
| LiPo sense 1 (ADC) | 1 |
|
||||
| LiPo sense 2 (ADC) | 12 (skipped if same as button) |
|
||||
|
||||
> **TODO:** GPIO assignments above are provisional; confirm pinning against the real board before release.
|
||||
|
||||
Startup order:
|
||||
|
||||
@@ -58,7 +63,8 @@ Startup order:
|
||||
2. **I2C bus** — IO expander `0x20`; optional **BMA456H** (`init_bma456`, same bus)
|
||||
3. `esp_now_comm_init(&app_config)` — WiFi + ESP-NOW
|
||||
4. `led_ring_init()`
|
||||
5. **Master only:** command queue, UART, registered commands (e.g. VERSION)
|
||||
5. `board_input_init()` — button press logs, LiPo ADC logs every **10 s**
|
||||
6. **Master only:** command queue, UART, registered commands (e.g. VERSION)
|
||||
|
||||
## BMA456 accelerometer (`bosch456.c`)
|
||||
|
||||
@@ -310,6 +316,7 @@ Target: ESP32-S3. Close serial monitor on the UART adapter port before running `
|
||||
| `cmd_client_info.c/h` | CLIENT_INFO handler |
|
||||
| `client_registry.c/h` | Registered slave table |
|
||||
| `bosch456.c/h` | BMA456H I2C driver, accel poll, tap INT, deadzone filter |
|
||||
| `board_input.c/h` | Taster GPIO12, LiPo ADC on GPIO1 / GPIO12 |
|
||||
| `led_ring.c/h` | LED digit display |
|
||||
| `proto/uart_messages.proto` | UART protocol schema |
|
||||
| `proto/esp_now_messages.proto` | ESP-NOW protocol schema |
|
||||
|
||||
Reference in New Issue
Block a user