Install arduino IDE
This commit is contained in:
parent
0cfbf63221
commit
074a547621
4 changed files with 84 additions and 1 deletions
18
roles/arduino/templates/arduino-push.j2
Normal file
18
roles/arduino/templates/arduino-push.j2
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
#!/bin/bash
|
||||
# {{ ansible_managed }}
|
||||
set -e
|
||||
|
||||
|
||||
# Ensure sketchfile is provided as an argument. This is the code file
|
||||
# that will be compiled and pushed to the Arduino board.
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Usage: $0 <sketchfile>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Declare path to Arduino binary. Will change according to Arduino version use.
|
||||
ARDUINO_BINARY="/opt/arduino/arduino-{{ arduino_version }}/arduino"
|
||||
|
||||
# Push code file to Arduino board
|
||||
$ARDUINO_BINARY --port "{{ arduino_port }}" --upload "$1"
|
||||
17
roles/arduino/templates/arduino-verify.j2
Normal file
17
roles/arduino/templates/arduino-verify.j2
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
# {{ ansible_managed }}
|
||||
set -e
|
||||
|
||||
|
||||
# Ensure sketchfile is provided as an argument. This is the code file
|
||||
# that will be compiled and its results reported.
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Usage: $0 <sketchfile>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Declare path to Arduino binary. Will change according to Arduino version use.
|
||||
ARDUINO_BINARY="/opt/arduino/arduino-{{ arduino_version }}/arduino"
|
||||
|
||||
# Build and verify code file without pushing to board.
|
||||
$ARDUINO_BINARY --verify "$1"
|
||||
Loading…
Add table
Add a link
Reference in a new issue