File tree Expand file tree Collapse file tree 6 files changed +7
-7
lines changed
ArduinoIoTCloud-Callbacks
ArduinoIoTCloud-DeferredOTA
utility/ArduinoIoTCloud_Travis_CI Expand file tree Collapse file tree 6 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1515void setup () {
1616 /* Initialize serial and wait up to 5 seconds for port to open */
1717 Serial.begin (9600 );
18- for (unsigned long const serialBeginTime = millis (); !Serial && (millis () - serialBeginTime > 5000 ); ) { }
18+ for (unsigned long const serialBeginTime = millis (); !Serial && (millis () - serialBeginTime <= 5000 ); ) { }
1919
2020 /* This function takes care of connecting your sketch variables to the ArduinoIoTCloud object */
2121 initProperties ();
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ static int const LED_BUILTIN = 2;
2323void setup () {
2424 /* Initialize serial and wait up to 5 seconds for port to open */
2525 Serial.begin (9600 );
26- for (unsigned long const serialBeginTime = millis (); !Serial && (millis () - serialBeginTime > 5000 ); ) { }
26+ for (unsigned long const serialBeginTime = millis (); !Serial && (millis () - serialBeginTime <= 5000 ); ) { }
2727
2828 /* Configure LED pin as an output */
2929 pinMode (LED_BUILTIN, OUTPUT);
Original file line number Diff line number Diff line change 88
99 You don't need any specific Properties to be created in order to demonstrate these functionalities.
1010 Simply create a new Thing and give it 1 arbitrary Property.
11- Remember that the Thing ID needs to be configured in thingProperties.h
11+ Remember that the Thing ID needs to be configured in thingProperties.h
1212 These events can be very useful in particular cases, for instance to disable a peripheral
1313 or a connected sensor/actuator when no data connection is available, as well as to perform
1414 specific operations on connection or right after properties values are synchronised.
3131void setup () {
3232 /* Initialize serial and wait up to 5 seconds for port to open */
3333 Serial.begin (9600 );
34- for (unsigned long const serialBeginTime = millis (); !Serial && (millis () - serialBeginTime > 5000 ); ) { }
34+ for (unsigned long const serialBeginTime = millis (); !Serial && (millis () - serialBeginTime <= 5000 ); ) { }
3535
3636 /* This function takes care of connecting your sketch variables to the ArduinoIoTCloud object */
3737 initProperties ();
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ bool onOTARequestCallback()
5656void setup () {
5757 /* Initialize serial and wait up to 5 seconds for port to open */
5858 Serial.begin (9600 );
59- for (unsigned long const serialBeginTime = millis (); !Serial && (millis () - serialBeginTime > 5000 ); ) { }
59+ for (unsigned long const serialBeginTime = millis (); !Serial && (millis () - serialBeginTime <= 5000 ); ) { }
6060
6161 /* Configure LED pin as an output */
6262 pinMode (LED_BUILTIN, OUTPUT);
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ static int const LED_BUILTIN = 2;
1515void setup () {
1616 /* Initialize the serial port and wait up to 5 seconds for a connection */
1717 Serial.begin (9600 );
18- for (unsigned long const serialBeginTime = millis (); !Serial && (millis () - serialBeginTime > 5000 ); ) { }
18+ for (unsigned long const serialBeginTime = millis (); !Serial && (millis () - serialBeginTime <= 5000 ); ) { }
1919
2020 /* Configure LED pin as an output */
2121 pinMode (LED_BUILTIN, OUTPUT);
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ void setup() {
1818
1919 Serial.begin (9600 );
2020 unsigned long serialBeginTime = millis ();
21- while (!Serial && (millis () - serialBeginTime > 5000 ));
21+ while (!Serial && (millis () - serialBeginTime <= 5000 ));
2222
2323 Serial.println (" Starting Arduino IoT Cloud Example" );
2424
You can’t perform that action at this time.
0 commit comments