Avrdude with raspberrypi

Hi Team!

I have been working on a side project to code my arduino using raspberrypi (using AVRDUDE).
I have successfully able to achieve this task but want to take it a little further.

I want to add these features-
If there is an error in uploading using AVRDUDE then 1 led should blink

can I interface avrdude with rpi or bash script.
I am uploading the code(hex file) using a bash script.

But I want to know if there is an error in the cable or any other fatal error then I should get an indication from my script rather than looking at the screen (monitor).

Thank \m/
You guys are Amazing!

Enable verbose output. More -v options increase verbosity level.

Different types of bash commands need to be run from the terminal based on the user’s requirements. When the user runs any command from the terminal then it shows the output if no error exists otherwise it shows the error message. Sometimes, the output of the command needs to be stored in a variable for future use. Shell command substitution feature of bash can be used for this purpose. How you can store different types of shell commands into the variable using this feature is shown in this tutorial.


During test execution any output sent to stdout and stderr is captured. If a test or a setup method fails its according captured output will usually be shown along with the failure traceback. (this behavior can be configured by the --show-capture command-line option).

In addition, stdin is set to a “null” object which will fail on attempts to read from it because it is rarely desired to wait for interactive input when running automated tests.

By default capturing is done by intercepting writes to low level file descriptors. This allows to capture output from simple print statements as well as output from a subprocess started by a test.

Capturing of the stdout/stderr output

Run a bash script in debug mode, show output and save it on a file

bash -x test.sh 2>&1 | tee out.test
Sends both stdout and stderr to the pipe which captures the data in the file 'out.test' and sends to stdout of tee (likely /dev/tty unless redirected). Works on Bourne, Korn and Bash shells.

Thanks a lot @rtek1000

I will update here about my progress with your valuable feedbacks.