Skip to content

Commit 08e9937

Browse files
committed
Updated YunSerialTerminal: added command to shutdown bridge
1 parent 567af70 commit 08e9937

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
'~' followed by '1' -> Set the UART speed to 115200 baud
1717
'~' followed by '2' -> Set the UART speed to 250000 baud
1818
'~' followed by '3' -> Set the UART speed to 500000 baud
19-
19+
'~' followeb by '~' -> Sends the bridge's shutdown command to
20+
obtain the console.
21+
2022
The circuit:
2123
* Arduino Yun
2224
@@ -59,6 +61,9 @@ void loop() {
5961
} else if (c == '3') { // '3' key pressed?
6062
Serial1.begin(500000); // set speed to 500000
6163
Serial.println("Speed set to 500000");
64+
} else if (c == '~') {
65+
Serial1.write((uint8_t *)"\xff\0\0\x05XXXXX\x0d\xaf", 11);
66+
Serial.println("Sending bridge's shutdown command");
6267
} else { // any other key pressed?
6368
Serial1.write('~'); // write '~' to Linino
6469
Serial1.write(c); // write char to Linino
@@ -70,4 +75,4 @@ void loop() {
7075
char c = (char)Serial1.read(); // read from Linino
7176
Serial.write(c); // write to USB-serial
7277
}
73-
}
78+
}

0 commit comments

Comments
 (0)