-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed scripts to work with native arduino command line tools
- Loading branch information
1 parent
75a3fb2
commit 1572c8e
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash -x | ||
|
||
#compile to hex file | ||
mkdir -p /tmp/build$1 | ||
/Applications/Arduino.app/Contents/MacOS/Arduino --verify $1 --board arduino:avr:mega --pref build.path=/tmp/build$1 && | ||
|
||
#scp hex file to pi | ||
scp /tmp/build$1/$(basename "$1").hex 192.168.1.5:/tmp/toupload.hex && | ||
|
||
#ssh -x upload script on pi | ||
ssh 192.168.1.5 "avrdude -p atmega2560 -P /dev/ttyACM0 -c wiring -b 115200 -D -U flash:w:/tmp/toupload.hex:i" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
#scp hex file to pi | ||
scp $1 192.168.1.5:/tmp/toupload.hex && | ||
|
||
#ssh -x upload script on pi | ||
ssh 192.168.1.5 "avrdude -p atmega2560 -P /dev/ttyACM0 -c wiring -b 115200 -D -U flash:w:/tmp/toupload.hex:i" |