Update Tutorials.md

This commit is contained in:
HomeSpan 2020-11-22 22:00:35 -06:00 committed by GitHub
parent 5456ca947d
commit a7ad2c4934
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -27,8 +27,13 @@ Example 5 expands on Example 2 by adding in the code needed to actually control
* creating derived device-specific Service structures (classes) from a base HomeSpan Service class
* implementing the virtual `update()` method for your derived Services
* saving references to Characteristic objects with a `SpanCharacteristic *` pointer
* retrieving new and updated Characterisrtic values with the `getVal()` and `getNewVal` methods
* retrieving new and updated Characteristic values with the `getVal()` and `getNewVal()` methods
### [Example 6 - DimmableLED](../examples/06-DimmableLED/06-DimmableLED.ino)
Example 6 changes Example 5 so that LED #2 is now dimmable, instead of just on/off. New HomeSpan API topics covered in this example include:
* implementing pulse-width-modulation on any ESP32 pin by instantiating a `PwmPin()` object
* setting the PWM level to control the brightness of an using the PwmPin `set()` method