13
13
// limitations under the License.
14
14
15
15
/* *
16
- * @brief This example demonstrates Zigbee analog input / output device.
16
+ * @brief This example demonstrates Zigbee binary input device.
17
17
*
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.
19
19
*
20
20
* Proper Zigbee mode must be selected in Tools->Zigbee mode
21
21
* and also the correct partition scheme must be selected in Tools->Partition Scheme.
22
22
*
23
23
* Please check the README.md for instructions and more detailed description.
24
24
*
25
25
* Created by Jan Procházka (https://github.com/P-R-O-C-H-Y/)
26
- * Modified by Pat Clay
27
26
*/
28
27
29
28
#ifndef ZIGBEE_MODE_ED
32
31
33
32
#include " Zigbee.h"
34
33
35
- /* Zigbee analog device configuration */
34
+ /* Zigbee binary sensor device configuration */
36
35
#define BINARY_DEVICE_ENDPOINT_NUMBER 1
37
36
38
37
uint8_t binaryPin = A0;
@@ -43,10 +42,6 @@ ZigbeeBinary zbBinaryZone = ZigbeeBinary(BINARY_DEVICE_ENDPOINT_NUMBER + 1);
43
42
44
43
bool binaryStatus = false ;
45
44
46
- void onAnalogOutputChange (float analog_output) {
47
- Serial.printf (" Received analog output change: %.1f\r\n " , analog_output);
48
- }
49
-
50
45
void setup () {
51
46
Serial.begin (115200 );
52
47
Serial.println (" Starting..." );
@@ -89,10 +84,6 @@ void setup() {
89
84
delay (100 );
90
85
}
91
86
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
96
87
}
97
88
98
89
void loop () {
0 commit comments