fix(zigbee): Enable internal pull-up resistor (#10491)
Enable the internal pull-up resistor for BUTTON_PIN
This commit is contained in:
parent
a0139bc37d
commit
1756bd567c
5 changed files with 5 additions and 5 deletions
|
|
@ -65,7 +65,7 @@ void setup() {
|
||||||
rgbLedWrite(LED_PIN, 0, 0, 0);
|
rgbLedWrite(LED_PIN, 0, 0, 0);
|
||||||
|
|
||||||
// Init button for factory reset
|
// Init button for factory reset
|
||||||
pinMode(BUTTON_PIN, INPUT);
|
pinMode(BUTTON_PIN, INPUT_PULLUP);
|
||||||
|
|
||||||
// Set callback function for light change
|
// Set callback function for light change
|
||||||
zbColorLight.onLightChange(setRGBLight);
|
zbColorLight.onLightChange(setRGBLight);
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ void setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Init button switch
|
//Init button switch
|
||||||
pinMode(SWITCH_PIN, INPUT);
|
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||||
|
|
||||||
//Optional: set Zigbee device name and model
|
//Optional: set Zigbee device name and model
|
||||||
zbSwitch.setManufacturerAndModel("Espressif", "ZigbeeSwitch");
|
zbSwitch.setManufacturerAndModel("Espressif", "ZigbeeSwitch");
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ void setup() {
|
||||||
digitalWrite(LED_PIN, LOW);
|
digitalWrite(LED_PIN, LOW);
|
||||||
|
|
||||||
// Init button for factory reset
|
// Init button for factory reset
|
||||||
pinMode(BUTTON_PIN, INPUT);
|
pinMode(BUTTON_PIN, INPUT_PULLUP);
|
||||||
|
|
||||||
//Optional: set Zigbee device name and model
|
//Optional: set Zigbee device name and model
|
||||||
zbLight.setManufacturerAndModel("Espressif", "ZBLightBulb");
|
zbLight.setManufacturerAndModel("Espressif", "ZBLightBulb");
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ void setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init button switch
|
// Init button switch
|
||||||
pinMode(BUTTON_PIN, INPUT);
|
pinMode(BUTTON_PIN, INPUT_PULLUP);
|
||||||
|
|
||||||
// Optional: set Zigbee device name and model
|
// Optional: set Zigbee device name and model
|
||||||
zbTempSensor.setManufacturerAndModel("Espressif", "ZigbeeTempSensor");
|
zbTempSensor.setManufacturerAndModel("Espressif", "ZigbeeTempSensor");
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ void setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init button switch
|
// Init button switch
|
||||||
pinMode(BUTTON_PIN, INPUT);
|
pinMode(BUTTON_PIN, INPUT_PULLUP);
|
||||||
|
|
||||||
// Set callback functions for temperature and configuration receive
|
// Set callback functions for temperature and configuration receive
|
||||||
zbThermostat.onTempRecieve(recieveSensorTemp);
|
zbThermostat.onTempRecieve(recieveSensorTemp);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue