From 31d383a62cce42625ff3ca178b06a321f3901601 Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Sun, 22 Nov 2020 22:06:47 -0600 Subject: [PATCH] Update Tutorials.md --- docs/Tutorials.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/Tutorials.md b/docs/Tutorials.md index d56d02e..947d472 100644 --- a/docs/Tutorials.md +++ b/docs/Tutorials.md @@ -25,6 +25,7 @@ Example 4 expands on Example 3 by adding Characteristics to set fan speed, fan r Example 5 expands on Example 2 by adding in the code needed to actually control LEDs connected to the ESP32 from HomeKit. In Example 2 we built out all the functionality to create a "Tile" Acessories inside HomeKit that displayed an on/off light, but these control did not actually operate anything on the ESP32. To operate actual devices HomeSpan needs to be programmed to respond to "update" requests from HomeKit by performing some form of operation. New HomeSpan API topics covered in this example include: * creating derived device-specific Service structures (classes) from a base HomeSpan Service class +* placing derived Service classes in their own \*.h files for readability and portability * implementing the virtual `update()` method for your derived Services * saving references to Characteristic objects with a `SpanCharacteristic *` pointer * retrieving new and updated Characteristic values with the `getVal()` and `getNewVal()` methods @@ -34,7 +35,9 @@ Example 6 changes Example 5 so that LED #2 is now dimmable, instead of just on/o * implementing pulse-width-modulation on any ESP32 pin by instantiating a `PwmPin()` object * setting the PWM level to control the brightness of an LED using the PwmPin `set()` method +* storing similar derived Service classes in the same \*.h file for ease of use +### [Example 7 - IdentifyRoutines](../examples/07-IdentifyRoutines/07-IdentifyRoutines.ino)