From 8975ec992222dc567be0669e66f09aa2a05d3c99 Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Sun, 4 Sep 2022 14:26:31 -0500 Subject: [PATCH] Update Reference.md --- docs/Reference.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/Reference.md b/docs/Reference.md index 8f7348c..024f2ca 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -30,9 +30,26 @@ The following **optional** `homeSpan` methods override various HomeSpan initiali * `void setControlPin(uint8_t pin)` * sets the ESP32 pin to use for the HomeSpan Control Button. If not specified, HomeSpan will assume there is no Control Button + +* `int getControlPin()` + * returns the pin number of the HomeSpan Control Button as set by `setControlPin(pin)`, or -1 if no pin has been set * `void setStatusPin(uint8_t pin)` - * sets the ESP32 pin to use for the HomeSpan Status LED. If not specified, HomeSpan will assume there is no Status LED + * sets the ESP32 pin to use for the HomeSpan Status LED + * assumes a standard LED will be connected to *pin* + * if neither this method nor `setStatusPixel()` is called, HomeSpan will assume there is no Status LED + +* `void setStatusPixel(uint8_t pin, float h=0, float s=100, float v=100)` + * sets the ESP32 pin to use for the HomeSpan Status LED + * assumes an RGB NeoPixel (or equivalent) will be connected to *pin* + * works well with ESP32 boards that have a built-in NeoPixel LED, though adding an external NeoPixel is fine + * users can optionally specify the color HomeSpan will use with the NeoPixel by providing the following HSV values: + * h = Hue from 0-360 + * s = Saturation percentage from 0-100 + * v = Brightness percentage from 0-100 + * color defaults to *red* if unspecified + * example: `homeSpan.setStatusPixel(8,120,100,20)` sets the Status LED to light green using a NeoPixel attached to pin 8 + * if neither this method nor `setStatusPin()` is called, HomeSpan will assume there is no Status LED * `void setStatusAutoOff(uint16_t duration)` * sets Status LED to automatically turn off after *duration* seconds