File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
hardware/arduino/avr/libraries/Bridge/examples/TimeCheck Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 77 using an Arduino Yun.
88
99 created 27 May 2013
10- modified 17 June 2013
10+ modified 21 June 2013
1111 By Tom Igoe
1212 */
1313
@@ -21,15 +21,16 @@ int lastSecond = -1; // need an impossible value for comparison
2121void setup () {
2222 Serial.begin (9600 ); // initialize serial
2323 Bridge.begin (); // initialize Bridge
24- delay (2000 ); // wait 2 seconds
25-
24+
2625 while (!Serial); // wait for Serial Monitor to open
2726 Serial.println (" Time Check" ); // Title of sketch
2827
2928 // run an initial date process. Should return:
3029 // hh:mm:ss :
3130 if (!date.running ()) {
32- date.runShellCommand (" date +%T" );
31+ date.begin (" date" );
32+ date.addParameter (" +%T" );
33+ date.run ();
3334 }
3435}
3536
@@ -48,7 +49,9 @@ void loop() {
4849
4950 // restart the date process:
5051 if (!date.running ()) {
51- date.runShellCommand (" date +%T" );
52+ date.begin (" date" );
53+ date.addParameter (" +%T" );
54+ date.run ();
5255 }
5356 }
5457
@@ -74,4 +77,3 @@ void loop() {
7477 }
7578
7679}
77-
You can’t perform that action at this time.
0 commit comments