Skip to content

Commit

Permalink
fixed scripts to work with native arduino command line tools
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyrcoyle committed Apr 17, 2016
1 parent 75a3fb2 commit 1572c8e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build_and_upload.sh
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"
7 changes: 7 additions & 0 deletions upload.sh
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"

0 comments on commit 1572c8e

Please sign in to comment.