From 28fd4273682d5d9f89a8363c2ad2af7ce64e0fd1 Mon Sep 17 00:00:00 2001 From: Piotr Dobrowolski Date: Tue, 12 Sep 2017 03:46:36 +0200 Subject: [PATCH] Add README and arduino update tool --- README.md | 6 ++++++ raspi/mgmt/arduino.yml | 8 ++++++++ raspi/mgmt/playbook.yml | 1 + 3 files changed, 15 insertions(+) create mode 100644 README.md create mode 100644 raspi/mgmt/arduino.yml diff --git a/README.md b/README.md new file mode 100644 index 0000000..49735e6 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +Building and deployment +======================= + + $ cd arduino && pio run && cd .. + $ cd raspi/mgmt && ansible-playbook playbook.yml && ansible-playbook + arduino.yml diff --git a/raspi/mgmt/arduino.yml b/raspi/mgmt/arduino.yml new file mode 100644 index 0000000..139e66b --- /dev/null +++ b/raspi/mgmt/arduino.yml @@ -0,0 +1,8 @@ +- hosts: raspi + become: True + become_user: root + tasks: + - copy: src=../../arduino/.pioenvs/megaatmega2560/firmware.hex dest=/tmp + - systemd: state=stopped name=lightdm + - shell: avrdude -p m2560 -c wiring -P /dev/serial/by-id/* -b 115200 -D -F -U flash:w:/tmp/firmware.hex + - systemd: state=started name=lightdm diff --git a/raspi/mgmt/playbook.yml b/raspi/mgmt/playbook.yml index 529d62f..9ef4c07 100644 --- a/raspi/mgmt/playbook.yml +++ b/raspi/mgmt/playbook.yml @@ -7,3 +7,4 @@ - copy: src=autostart dest=/home/pi/.config/lxsession/LXDE-pi/autostart - copy: src=sejf.desktop dest=/etc/xdg/autostart - apt: name=python-flask state=present + - apt: name=avrdude state=present