fix(example): Remove wait on Serial after begin

This commit is contained in:
Jan Procházka 2024-12-11 10:35:54 +01:00
parent d7492b167c
commit 07a3e629c8
8 changed files with 3 additions and 24 deletions

View file

@ -66,9 +66,6 @@ void identify(uint16_t time) {
/********************* Arduino functions **************************/ /********************* Arduino functions **************************/
void setup() { void setup() {
Serial.begin(115200); Serial.begin(115200);
while (!Serial) {
delay(10);
}
// Init RMT and leave light OFF // Init RMT and leave light OFF
rgbLedWrite(led, 0, 0, 0); rgbLedWrite(led, 0, 0, 0);

View file

@ -47,9 +47,6 @@ ZigbeeColorDimmerSwitch zbSwitch = ZigbeeColorDimmerSwitch(SWITCH_ENDPOINT_NUMBE
/********************* Arduino functions **************************/ /********************* Arduino functions **************************/
void setup() { void setup() {
Serial.begin(115200); Serial.begin(115200);
while (!Serial) {
delay(10);
}
//Init button switch //Init button switch
pinMode(button, INPUT_PULLUP); pinMode(button, INPUT_PULLUP);

View file

@ -47,9 +47,7 @@ void setLED(bool value) {
/********************* Arduino functions **************************/ /********************* Arduino functions **************************/
void setup() { void setup() {
Serial.begin(115200); Serial.begin(115200);
while (!Serial) {
delay(10);
}
// Init LED and turn it OFF (if LED_PIN == RGB_BUILTIN, the rgbLedWrite() will be used under the hood) // Init LED and turn it OFF (if LED_PIN == RGB_BUILTIN, the rgbLedWrite() will be used under the hood)
pinMode(led, OUTPUT); pinMode(led, OUTPUT);
digitalWrite(led, LOW); digitalWrite(led, LOW);

View file

@ -95,9 +95,6 @@ static void enableGpioInterrupt(bool enabled) {
/********************* Arduino functions **************************/ /********************* Arduino functions **************************/
void setup() { void setup() {
Serial.begin(115200); Serial.begin(115200);
while (!Serial) {
delay(10);
}
//Optional: set Zigbee device name and model //Optional: set Zigbee device name and model
zbSwitch.setManufacturerAndModel("Espressif", "ZigbeeSwitch"); zbSwitch.setManufacturerAndModel("Espressif", "ZigbeeSwitch");

View file

@ -76,9 +76,6 @@ void printScannedNetworks(uint16_t networksFound) {
void setup() { void setup() {
Serial.begin(115200); Serial.begin(115200);
while (!Serial) {
delay(10);
}
// Initialize Zigbee stack without any EPs just for scanning // Initialize Zigbee stack without any EPs just for scanning
if (!Zigbee.begin(role)) { if (!Zigbee.begin(role)) {

View file

@ -68,9 +68,7 @@ void meausureAndSleep() {
/********************* Arduino functions **************************/ /********************* Arduino functions **************************/
void setup() { void setup() {
Serial.begin(115200); Serial.begin(115200);
while (!Serial) {
delay(10);
}
// Init button switch // Init button switch
pinMode(button, INPUT_PULLUP); pinMode(button, INPUT_PULLUP);

View file

@ -53,9 +53,7 @@ static void temp_sensor_value_update(void *arg) {
/********************* Arduino functions **************************/ /********************* Arduino functions **************************/
void setup() { void setup() {
Serial.begin(115200); Serial.begin(115200);
while (!Serial) {
delay(10);
}
// Init button switch // Init button switch
pinMode(button, INPUT_PULLUP); pinMode(button, INPUT_PULLUP);

View file

@ -60,9 +60,6 @@ void recieveSensorConfig(float min_temp, float max_temp, float tolerance) {
/********************* Arduino functions **************************/ /********************* Arduino functions **************************/
void setup() { void setup() {
Serial.begin(115200); Serial.begin(115200);
while (!Serial) {
delay(10);
}
// Init button switch // Init button switch
pinMode(button, INPUT_PULLUP); pinMode(button, INPUT_PULLUP);