huesmith 0.1.0

Hue-compatible Zigbee light library for ESP32-C6/H2 (ESP-IDF)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Dimmable light — single PWM channel, no colour control.
//!
//! Wiring: any LED load on GPIO_DIM with appropriate driver circuit.
//!
//! Adjust the GPIO number to match your hardware.
//! `.mac()` is optional; omit it to let the ESP32 use its built-in MAC.
//! `.reset_pin()` enables factory reset: hold the pin low at boot to unpair.
//!
//! Reference code, not standalone firmware — see `examples/README.md`.

fn main() {
    const GPIO_DIM: u8 = 19;

    huesmith::dimmable(GPIO_DIM)
        .reset_pin(9) // BOOT button on most ESP32-C6 boards
        // .mac([0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x00, 0x01])
        .launch();
}