diff options
| author | Sudar <sudar@sudarmuthu.com> | 2013-06-11 15:37:56 +0530 |
|---|---|---|
| committer | Sudar <sudar@sudarmuthu.com> | 2013-06-11 15:46:22 +0530 |
| commit | f26a134418346cb8ae5745660f77b5e2d26d9148 (patch) | |
| tree | 99d52940f42d9563b45073fa17dc140057920476 /bin | |
| parent | 675927053720fb8e96c96006ee9a4db095e0adc2 (diff) | |
| parent | 36c32e75cc1a8dd41f769d8576e8cde9cff03dde (diff) | |
Add support for leonardo.
Leonardo board requires a new way of handling board reset.
There is a new script which does the reset differently for leonardo boards.
close #30 and close #44
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/ard-reset-leonardo | 12 | ||||
| -rwxr-xr-x | bin/wait-connection-leonardo | 15 |
2 files changed, 27 insertions, 0 deletions
diff --git a/bin/ard-reset-leonardo b/bin/ard-reset-leonardo new file mode 100755 index 0000000..dc05f06 --- /dev/null +++ b/bin/ard-reset-leonardo @@ -0,0 +1,12 @@ +#! /usr/bin/python + +import sys +import serial + +ser = serial.Serial(sys.argv[1], 57600) +ser.close() +ser.open() +ser.close() +ser.setBaudrate(1200) +ser.open() +ser.close() diff --git a/bin/wait-connection-leonardo b/bin/wait-connection-leonardo new file mode 100755 index 0000000..92d26f7 --- /dev/null +++ b/bin/wait-connection-leonardo @@ -0,0 +1,15 @@ +#! /bin/bash + +while [ ! -e $1 ] +do + echo Waiting connection at $1 + sleep 0.2 +done + +sleep 1 +# necessary for me... +# /dev/ttyACM0 used to disappear after the reset +# but no longer now. How can I tell whether the +# connection is ready? + +echo Connection Established |
