|
LCC Fusion Project 1.0
LCC Automation
|
Firmware for the LCC Fusion UOD (Ultrasonic Occupancy Detection) Card. More...

Classes | |
| struct | SensorRange |
| Per-card occupancy thresholds (mA) for each sensor on a BSD Card. More... | |
| struct | SensorStatus |
| Sensor status bitmask structure. More... | |
Functions | |
| static HCSR04 | hc (UOD_TRIGGER_PIN, ECHO_PINS_SET, NUM_UOD_SENSORS_PER_CARD) |
| HC-SR04 driver instance. | |
| void | onI2cRequest () |
| I2C onRequest handler: send the 2-byte sensor bitmap. More... | |
| void | setupHelpCallback () |
| Register help/usage text for this card (shown on user request). More... | |
| void | setupTestCallback () |
| Install the test callback for the Audio Card commands. | |
| void | setupProgramCallback () |
| Install the progam callback for the Card commands. | |
| void | getSensorRanges () |
| Parse up to NUM_UOD_SENSORS_PER_CARD "< min_cm max_cm ... >" pairs and update ranges. Rules: More... | |
| void | initSerialComm () |
| One-time initialization for SerialIO, I2C slave registration, and optional diagnostics. More... | |
| void | setup () |
| Arduino setup for the BSD Card. More... | |
| void | loop () |
| Main loop: poll SerialIO for range updates and perform timed ultrasonic sweeps. More... | |
Variables | |
| static constexpr uint8_t | I2C_ADDR_OFFSET_PIN_SET [3] = { 27, 26, 25 } |
| GPIO pins used for I2C address selection DIP switches. More... | |
| static constexpr uint8_t | I2C_SDA_PIN = 12 |
| Default I2C SDA pin (ESP32 I2C bus 0). | |
| static constexpr uint8_t | I2C_SCL_PIN = 14 |
| Default I2C SCL pin (ESP32 I2C bus 0). | |
Firmware for the LCC Fusion UOD (Ultrasonic Occupancy Detection) Card.
High-level overview and links to the main entry points (setup/loop) and helper functions used by the UOD firmware.
| void getSensorRanges | ( | ) |
Parse up to NUM_UOD_SENSORS_PER_CARD "< min_cm max_cm ... >" pairs and update ranges. Rules:
Definition at line 184 of file UOD_Card.ino.


| void initSerialComm | ( | ) |
One-time initialization for SerialIO, I2C slave registration, and optional diagnostics.
Computes the final I2C address from DIP pins (base + offset) as defined in config.h, registers onRequest (and onReceive if used), and sets up any help/diagnostic callbacks.
Definition at line 269 of file UOD_Card.ino.


| void loop | ( | ) |
Main loop: poll SerialIO for range updates and perform timed ultrasonic sweeps.
Definition at line 300 of file UOD_Card.ino.

| void onI2cRequest | ( | ) |
I2C onRequest handler: send the 2-byte sensor bitmap.
The master expects exactly 2 bytes. Send little-endian order: LSB first, then MSB of the current triggered bitmap.
Definition at line 123 of file UOD_Card.ino.

| void setup | ( | ) |
Arduino setup for the BSD Card.
Verifies MCU is running on correct hardware Initializes GPIO, I2C, and register callbacks for serial commands (?, P, < cmd >, T)
Definition at line 283 of file UOD_Card.ino.

| void setupHelpCallback | ( | ) |
Register help/usage text for this card (shown on user request).
Purely diagnostic; does not alter ranges or bitmap.
Definition at line 132 of file UOD_Card.ino.

|
staticconstexpr |