@@ -31,9 +31,9 @@ MatterTemperatureSensor SimulatedTemperatureSensor;
31
31
const uint8_t buttonPin = BOOT_PIN; // Set your pin here. Using BOOT Button.
32
32
33
33
// Button control - decommision the Matter Node
34
- uint32_t button_time_stamp = 0 ; // debouncing control
35
- bool button_state = false ; // false = released | true = pressed
36
- const uint32_t decommissioningTimeout = 5000 ; // keep the button pressed for 5s, or longer, to decommission
34
+ uint32_t button_time_stamp = 0 ; // debouncing control
35
+ bool button_state = false ; // false = released | true = pressed
36
+ const uint32_t decommissioningTimeout = 5000 ; // keep the button pressed for 5s, or longer, to decommission
37
37
38
38
// WiFi is manually set and started
39
39
const char *ssid = " your-ssid" ; // Change this to your WiFi SSID
@@ -98,14 +98,14 @@ void setup() {
98
98
99
99
void loop () {
100
100
static uint32_t timeCounter = 0 ;
101
-
101
+
102
102
// Print the current temperature value every 5s
103
103
if (!(timeCounter++ % 10 )) { // delaying for 500ms x 10 = 5s
104
104
// Print the current temperature value
105
105
Serial.printf (" Current Temperature is %.02f <Temperature Units>\r\n " , SimulatedTemperatureSensor.getTemperature ());
106
106
// Update Temperature from the (Simulated) Hardware Sensor
107
107
// Matter APP shall display the updated temperature percent
108
- SimulatedTemperatureSensor.setTemperature (getSimulatedTemperature ());
108
+ SimulatedTemperatureSensor.setTemperature (getSimulatedTemperature ());
109
109
}
110
110
111
111
// Check if the button has been pressed
@@ -124,8 +124,8 @@ void loop() {
124
124
if (button_state && time_diff > decommissioningTimeout) {
125
125
Serial.println (" Decommissioning the Light Matter Accessory. It shall be commissioned again." );
126
126
Matter.decommission ();
127
- button_time_stamp = millis (); // avoid running decommissining again, reboot takes a second or so
127
+ button_time_stamp = millis (); // avoid running decommissining again, reboot takes a second or so
128
128
}
129
-
129
+
130
130
delay (500 );
131
131
}
0 commit comments