diff options
author | Tom Igoe <tom.igoe@gmail.com> | 2013-06-22 02:03:47 -0400 |
---|---|---|
committer | Tom Igoe <tom.igoe@gmail.com> | 2013-06-22 02:03:47 -0400 |
commit | f6cdb62ec392892352251b9fcc619c1e9fa099d1 (patch) | |
tree | ddce12139472f82be16c5fa18f5061c253db2517 /libraries/Bridge | |
parent | 4d6234529f4d32088a361ae73674b52515a3abfe (diff) |
Simplified TimeCheck
Diffstat (limited to 'libraries/Bridge')
-rw-r--r-- | libraries/Bridge/examples/TimeCheck/TimeCheck.ino | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libraries/Bridge/examples/TimeCheck/TimeCheck.ino b/libraries/Bridge/examples/TimeCheck/TimeCheck.ino index 0dd8dc3..2673dea 100644 --- a/libraries/Bridge/examples/TimeCheck/TimeCheck.ino +++ b/libraries/Bridge/examples/TimeCheck/TimeCheck.ino @@ -7,7 +7,7 @@ using an Arduino Yun. created 27 May 2013 - modified 17 June 2013 + modified 21 June 2013 By Tom Igoe */ @@ -21,15 +21,16 @@ int lastSecond = -1; // need an impossible value for comparison void setup() { Serial.begin(9600); // initialize serial Bridge.begin(); // initialize Bridge - delay(2000); // wait 2 seconds - + while(!Serial); // wait for Serial Monitor to open Serial.println("Time Check"); // Title of sketch // run an initial date process. Should return: // hh:mm:ss : if (!date.running()) { - date.runShellCommand("date +%T"); + date.begin("date"); + date.addParameter("+%T"); + date.run(); } } @@ -48,7 +49,9 @@ void loop() { // restart the date process: if (!date.running()) { - date.runShellCommand("date +%T"); + date.begin("date"); + date.addParameter("+%T"); + date.run(); } } @@ -74,4 +77,3 @@ void loop() { } } - |