1313// limitations under the License.
1414
1515/* *
16- * @brief This example demonstrates Zigbee analog input / output device.
16+ * @brief This example demonstrates Zigbee binary input device.
1717 *
18- * The example demonstrates how to use Zigbee library to create a end device analog device.
18+ * The example demonstrates how to use Zigbee library to create an end device binary sensor device.
1919 *
2020 * Proper Zigbee mode must be selected in Tools->Zigbee mode
2121 * and also the correct partition scheme must be selected in Tools->Partition Scheme.
2222 *
2323 * Please check the README.md for instructions and more detailed description.
2424 *
2525 * Created by Jan Procházka (https://github.com/P-R-O-C-H-Y/)
26- * Modified by Pat Clay
2726 */
2827
2928#ifndef ZIGBEE_MODE_ED
3231
3332#include " Zigbee.h"
3433
35- /* Zigbee analog device configuration */
34+ /* Zigbee binary sensor device configuration */
3635#define BINARY_DEVICE_ENDPOINT_NUMBER 1
3736
3837uint8_t binaryPin = A0;
@@ -43,10 +42,6 @@ ZigbeeBinary zbBinaryZone = ZigbeeBinary(BINARY_DEVICE_ENDPOINT_NUMBER + 1);
4342
4443bool binaryStatus = false ;
4544
46- void onAnalogOutputChange (float analog_output) {
47- Serial.printf (" Received analog output change: %.1f\r\n " , analog_output);
48- }
49-
5045void setup () {
5146 Serial.begin (115200 );
5247 Serial.println (" Starting..." );
@@ -89,10 +84,6 @@ void setup() {
8984 delay (100 );
9085 }
9186 Serial.println (" Connected" );
92-
93- // // Optional: Add reporting for analog input
94- // zbBinaryFan.setBinaryInputReporting(0, 30, 10); // report every 30 seconds if value changes by 10
95- // zbBinaryZone.setBinaryInputReporting(0, 30, 10); // report every 30 seconds if value changes by 10
9687}
9788
9889void loop () {
0 commit comments