Skip to content

A set of scripts for automating the flashing of Raspberry Pi connected Arduinos.

License

Notifications You must be signed in to change notification settings

kanflo/arduino-autoflasher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arduino-autoflasher

This is an attempt to automate the flow of building and flashing firmwares for Arduinos connected to Raspberry Pis. I got tired of building the Arduino binary in the Arduino IDE on my Mac, scp:ing the firmware to the Pi and then running a script on the Pi to reset the AVR and run avrdude.

First edit avr-reset.py so it pulls the correct pin for resetting your Raspberry Pi connected Arduino. Then copy avrreset, avr-reset.py and flashserver.py to your Raspberry Pi.

On your pi:

% chomod +x avrreset avr-reset.py flashserver.py
% sudo cp avrreset avr-reset.py /usr/local/bin
% ./flashserver-py

On your computer running the Arduino IDE:

<build Arduino binary>
% ./flashclient.py --host <rpi ip> </path/to/arduino.hex>

Host and port may be configured and a secret may be added that the client and server must agree on for flashing to start.

Bonus: if using fswatch (https://github.com/emcrisostomo/fswatch) you can have the Arduino firmware automatically uploaded and flashed after building it in the IDE. eg.

% fswatch /var/folders/sk/0r9hjmx17r9_kls1zp3xddj00000gp/T/build3365321683727688908.tmp/MySketch.cpp.hex | xargs -n1 -J% ./flashclient.py  --host 172.16.3.124 %

Dependencies

About

A set of scripts for automating the flashing of Raspberry Pi connected Arduinos.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages