adafruit / Adafruit_WICED_Arduino

Adafruit WICED Feather Arduino BSP
https://www.adafruit.com/products/3056
27 stars 19 forks source link

Verify All `While (!Serial)` loops #62

Closed microbuilder closed 8 years ago

microbuilder commented 8 years ago

All examples should be checked so that the initial Serial check waiting for Serial Monitor to be opened includes a 'delay' to avoid issues with RTOS task switching:

while (!Serial)
{
  /* Delay required to avoid RTOS task switching problems */
  delay(10);
}

Or alternatively:

while (!Serial) { yield(); }
hathach commented 8 years ago

all examples already has delay(1). Only a few like Blink that user modifies since it does not use Serial. Though, I will add the comment about the RTOS task to make it clearer.