Skip to content

Instantly share code, notes, and snippets.

@mikebranstein
Created September 19, 2017 15:20
Show Gist options
  • Save mikebranstein/3f549487a71c534d070fbb99632546e7 to your computer and use it in GitHub Desktop.
Save mikebranstein/3f549487a71c534d070fbb99632546e7 to your computer and use it in GitHub Desktop.
Weather monitor init code
void WeatherService::init(bool debugMode) {
_debugMode = debugMode;
if (debugMode) {
Serial.begin(9600); // open serial over USB at 9600 baud
// Make sure your Serial Terminal app is closed before powering your device
// Now open your Serial Terminal, and hit any key to continue!
Serial.println("Press any key to begin");
//This line pauses the Serial port until a key is pressed
while(!Serial.available()) Spark.process();
}
// more init code for sensors goes here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment