Skip to content

Instantly share code, notes, and snippets.

@RecNes
Created December 4, 2016 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RecNes/1c413d8bdd15f97d87a9425357f3ce65 to your computer and use it in GitHub Desktop.
Save RecNes/1c413d8bdd15f97d87a9425357f3ce65 to your computer and use it in GitHub Desktop.
How to make wait/pause the sketch for Arduino IDE serial console to open.
void setup() {
Serial.begin(9600);
// Wait for the users to turn on the serial monitor and press the enter key to continue.
while (!Serial.available()) {
; // Wait for enter key;
}
// put your setup code here, to run once:
}
void loop {
// put your main code here, to run repeatedly:
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment