Did you ever needed to change firmware on the Arduino, for example to use it as a MIDI device? Here is a guide to upload new firmware onto your Arduino using an Apple computer.

If you ever uploaded new firmware on the Arduino using a Windows computer, you know this isn't to difficult: Using the application FLIP you're able to select the firmware file and FLIP will do the rest for you. However, on Apple computer, things are a little bit more complicated, because FLIP is Windows only. This guide will explain what steps are needed in order to successfully flash your Arduino to run a different software.

Before we start, there are some programs you need to download

1. First, download and the dfu-programmer file and unzip it.

2. Open the terminal application and navigate to the unzipped file by typing in the file path. If the file is saved in your download folder, the command will look like this:

cd Downloads/dfu-programmer-master

3. Type the following command:


(Press the enter key)


(Press the enter key)<br>


(Press the enter key)

make install

(Press the enter key)

4. The dfu-programmer is install now. Download a firmware (.hex) file you want to upload to your Arduino. Or if your Arduino appears to be dead and you want to restore it, the hex file can be found in the Arduino hardware folder.

Step 1: Uploading the New Firmware

Now it's time to flash the new firmwarm onto your Arduino:

1. Connect your Arduino using a USB cable.

2. Open the Terminal application.

3. In Terminal, navigate to where you stored the hex file. Since I saved the firmware for my Arduino in the Download folder, I type:

cd Downloads/

4. Put your Arduino into DFU-mode by connecting the pins shown in the picture for 1 or 2 seconds.

5. Type in the Terminal window:

 sudo dfu-programmer atmega16u2 erase

If you are asked for a password, type in your master account password.

6. Type in the Terminal window:

dfu-programmer atmega16u2 flash [the name of your firmware file].hex

For example:

dfu-programmer atmega16u2 flash dualMoco.hex

7. Type in the Terminal window:

 dfu-progammer atmega16u2 reset

8. You are done! Reconnect your Arduino and you should be good to go!




If you get an error 'no device present', it's likely you haven't put your Arduino into DFU the right way or that software is missing. May you encounter any other errors during the process, do not hesitate to ask in the comments for help. I will do my best to help you!

<p>What can I do if I get that no device present? (I checked the wiring of the reset pin too, and it's ok)</p>
<p>Im having a problem at the make step: fatal error: 'libusb.h' file not found<br><br>anyone has found a solution for this issue?</p>
<p>Hi! Thanks for this instructable.</p><p>However, i'm getting this when executing &quot;./bootstrap.sh&quot; command <br><br>&quot;sh: autom4te: command not found</p><p>aclocal: error: echo failed with exit status: 127</p><p>./bootstrap.sh: line 3: autoheader: command not found</p><p>sh: autoconf: command not found</p><p>automake: error: autoconf failed with exit status: 127</p><p>./bootstrap.sh: line 5: autoconf: command not found&quot;</p><p>Any idea what's missing and how to solve it?</p>
<p>I might have found a solution, you need to install homebrew. To do so, run this command in the terminal:</p><p>/usr/bin/ruby -e &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/instal...</p><p>Please let me know if it worked!</p>
It didin't. <br><br>I've copy pasted that line into my terminal, but seems incomplete
<p>hmm, it looks like Instructables cut off my link, here's the source:</p><p>http://stackoverflow.com/questions/37867376/dfu-programmer-0-6-2-error-message-during-bootstrap-sh </p>

About This Instructable



More by Bas van Straaten:How to Make a Cheap Arduino MIDI Controller Arduino DFU-programmer on Mac OS Arduino Touch Capacitive MIDI Keyboard 
Add instructable to: