From 6d47b4606b34495372c9f385b258cc69e5e35fa1 Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Mon, 23 Nov 2020 07:53:48 -0600 Subject: [PATCH] Update Tutorials.md --- docs/Tutorials.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/Tutorials.md b/docs/Tutorials.md index 0222dc3..8466a3f 100644 --- a/docs/Tutorials.md +++ b/docs/Tutorials.md @@ -62,6 +62,12 @@ This example explores how the Name Characteristic can be used to create differen * setting the primary Service for an Accessory with the `setPrimary()` method +### [Example 12 - ServiceLoops](../examples/12-ServiceLoops/12-ServiceLoops.ino) +Example 12 introduces HomeKit *Event Notifications* to implement two new accessories - a Temperature Sensor and an Air Quality Sensor. Of course we won't actually have these physical devices attached to the ESP32 for the purpose of this example, but we will simulate "reading" their properties on a periodic basis, and notify HomeKit of any changed values. New HomeSpan API topics covered in this example include: + +* implementing the virtual `loop()` method for your derived Services +* keeping track of elapsed time since the last update of a Characteristic with the `timeVal()` method +* setting the value of a Characteristic and triggering an Event Notification with the `setVal()` method ---