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