blink 3 times while waiting for serial

pico-fc-test
alanbjohnston 3 years ago committed by GitHub
parent 1936a60e2d
commit cb30197aa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -184,7 +184,22 @@ void setup() {
Serial.begin(115200); Serial.begin(115200);
bool timeout = false; bool timeout = false;
bool take_photo = false; bool take_photo = false;
Serial.println("\nBlink three times");
digitalWrite(LED_PIN, LOW); // Turn on
delay (100); // Wait 0.1 sec
digitalWrite(LED_PIN, HIGH); // Turn off
delay(100); // Wait 0.1 sec
digitalWrite(LED_PIN, LOW); // Turn on
delay (100); // Wait 0.1 sec
digitalWrite(LED_PIN, HIGH); // Turn off
delay(100); // Wait 0.1 sec
digitalWrite(LED_PIN, LOW); // Turn on
delay (100); // Wait 0.1 sec
digitalWrite(LED_PIN, HIGH); // Turn off
Serial.println("Checking for serial input before sleeping"); Serial.println("Checking for serial input before sleeping");
unsigned long timer_ms = millis(); unsigned long timer_ms = millis();
while ((Serial.available() <= 0) && !timeout) { while ((Serial.available() <= 0) && !timeout) {

Loading…
Cancel
Save

Powered by TurnKey Linux.