Skip to content

Commit 42d7b1d

Browse files
committed
modified the WifiStatus example and comments in TimeCheck example
1 parent dbd001a commit 42d7b1d

File tree

2 files changed

+29
-10
lines changed

2 files changed

+29
-10
lines changed

hardware/arduino/avr/libraries/Bridge/examples/TimeCheck/TimeCheck.ino

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44
55
Gets the time from the linino processor via Bridge
66
then parses out hours, minutes and seconds for the Arduino
7-
using an Arduino Yun.
7+
using an Arduino Yún.
88
99
created 27 May 2013
1010
modified 21 June 2013
1111
By Tom Igoe
12+
13+
This example code is in the public domain.
14+
1215
*/
1316

1417

@@ -19,10 +22,10 @@ int hours, minutes, seconds; // for the results
1922
int lastSecond = -1; // need an impossible value for comparison
2023

2124
void setup() {
22-
Serial.begin(9600); // initialize serial
2325
Bridge.begin(); // initialize Bridge
26+
Serial.begin(9600); // initialize serial
2427

25-
while(!Serial); // wait for Serial Monitor to open
28+
while(!Serial); // wait for Serial Monitor to open
2629
Serial.println("Time Check"); // Title of sketch
2730

2831
// run an initial date process. Should return:

hardware/arduino/avr/libraries/Bridge/examples/WiFiStatus/WiFiStatus.ino

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
2+
/*
3+
WiFi Status
4+
5+
This sketch run a script already present on your Yún in the
6+
/arduino directory called "pretty_wifi_info.lua" that takes
7+
the informations of the WiFi interface and print it on the
8+
Serial monitor.
9+
10+
created 18 June 2013
11+
By Federico Fissore
12+
13+
This example code is in the public domain.
14+
15+
*/
16+
117
#include <Process.h>
218

319
void setup() {
@@ -7,22 +23,22 @@ void setup() {
723
Serial.println("Starting bridge...\n");
824
pinMode(13,OUTPUT);
925
digitalWrite(13, LOW);
10-
Bridge.begin(); // make contact with the linux processor
11-
digitalWrite(13, HIGH);
26+
Bridge.begin(); // make contact with the linux processor
27+
digitalWrite(13, HIGH); // Led on pin 13 turns on when the bridge is ready
1228

13-
delay(2000); // wait 2 seconds
29+
delay(2000); // wait 2 seconds
1430
}
1531

1632
void loop() {
17-
Process wifiCheck; // initialize a new process
33+
Process wifiCheck; // initialize a new process
1834

19-
wifiCheck.runShellCommand("lua /arduino/pretty_wifi_info.lua"); // command you want to run
35+
wifiCheck.runShellCommand("lua /arduino/pretty_wifi_info.lua"); // command you want to run
2036

2137
// while there's any characters coming back from the
2238
// process, print them to the serial monitor:
2339
while (wifiCheck.available() > 0) {
24-
char thisChar = wifiCheck.read();
25-
Serial.print(thisChar);
40+
char c = wifiCheck.read();
41+
Serial.print(c);
2642
}
2743

2844
Serial.println();

0 commit comments

Comments
 (0)