Created
September 19, 2017 15:20
-
-
Save mikebranstein/3f549487a71c534d070fbb99632546e7 to your computer and use it in GitHub Desktop.
Weather monitor init code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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