I struggled many hours to figure out how to flash the KK 2.0 flying board using an Arduino Uno.
I finally figured it out and thought I’d share with all of you. I assume you know how to upload sketches to your Arduino. Thanks to FakuFaku for the final helping hand
Prerequisites
- Installed Arduino IDE 1.0.3 or greater
- Installed avrdude for Windows, version 5.11svn worked great. If you don’t know how this works, just download the KK 2.0 windows flashing tool from (http://lazyzero.de/en/modellbau/kkmulticopterflashtool) and the avrdude.exe will be in lib/avrdude/windows/avrdude.exe. The GUI is supposed to work, but just running simple commands from the command line (see below, will work most of the time).
- Downloaded the Firmware for flashing the KK 2.0. You may download some using the tool or you may find them on HobbyKing for instance.
Materials List
- KK 2.0 flying board (HobbyKing) – ~22 €
- Arduino Uno R3 (Sparkfun) – ~22 €
- 10 uF Electrolytic Capacitor (Tayda) – ~ 0.01 €
- Some F/F and M/F jumper cables (Sparkfun)
- External Power supply for the KK (eg. a 800 mAh LiPo (HobbyKing)) – ~ 4€
Setup
These instructions are both valid for the Arduino Uno R3 and the Arduino Mega 2560.
First you will simply connect your Arduino to your PC using USB and through the Arduino IDE, in File->Examples->ArduinoISP you will upload that sketch to your Arduino.
This step will make the Arduino a programmer.
Wire up the Arduino and the KK 2.0 board according to the following pin layout
On the KK 2.0 board, the Vcc (aKa Pin 2) is on the bottom left corner, eg as far away from the LCD as possible. From there, you may wire up the other connectors.
MISO goes to MISO, MOSI goes to MOSI etc…
Arduino Uno R3 Pins
- Arduino Pin 10 – SS / Reset
- Arduino Pin 11 – MOSI
- Arduino Pin 12 – MISO
- Arduino Pin 13 – SCK
Arduino Mega 2560 Pins
- Arduino Pin 50 – MISO
- Arduino Pin 51 – MOSI
- Arduino Pin 52 – SCK
- Arduino Pin 53 – SS / Reset
Note: Do NOT connect Vcc from the Arduino to the KK 2.0. That will not work.
Make sure of the following points:
- Connect one of the ESCs to the KK board as we will use this to power the board externally.
- Connect the ground from the ESC pin row to the same ground as the Arduino and the GND from the ISP on the KK
- Make sure to put a 10 uF electrolytic capacitor between the SS / Reset pin and the GND. Refer to the schematic picture for more details. Basically, the long pin of the capacitor goes near the SS part and the small leg goes to the GND.

- Next you want to make sure that your Arduino is powered through the USB or an external barrel jack
- Connect the KK 2.0 to an external battery, for instance the 800 mAh to fly the quad. The flashing will NOT work if you fail to power it seperately.
Flashing
Now that everything is powered and connected, you can try running the following command from the command line to see if it works:
Arduino Uno R3
D:\kkflashtool\lib\avrdude\windows>avrdude -P COM4 -p m324pa -c arduino -b 19200
Arduino Mega 2560
D:\kkflashtool\lib\avrdude\windows>avrdude -P COM4 -p m324pa -c avrisp -b 19200
Replace COM4 with the port on which your Arduino is connected to.
For the Arduino Uno R3, the output should be as follows:
avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.02s avrdude: Device signature = 0x1e9511 avrdude: safemode: Fuses OK avrdude done. Thank you.
The Arduino Mega will be similar.
If you get an everything OK, then we are ready to flash.
Execute the following commands.
Arduino Uno R3
D:\kkflashtool\lib\avrdude\windows>avrdude.exe -P COM4 -b 19200 -c arduino -p m324pa -v -e -U flash:w:kk2.hex:i
Arduino Mega 2560
D:\kkflashtool\lib\avrdude\windows>avrdude.exe -P COM4 -b 19200 -c avrisp -p m324pa -v -e -U flash:w:kk2.hex:i
- Replace COM4 with the port on which your Arduino is connected to.
- Replace the kk2.hex part with the full path to your firmware file.
For the Arduino Uno R3, the output should be as follows:
... Reading | ################################################## | 100% 24.92s avrdude.exe: verifying ... avrdude.exe: 32112 bytes of flash verified avrdude.exe: safemode: lfuse reads as D7 avrdude.exe: safemode: hfuse reads as D1 avrdude.exe: safemode: efuse reads as FC avrdude.exe: safemode: Fuses OK avrdude.exe done. Thank you.
The Arduino Mega will be similar.
Please note that the screen will become white during and after flashing. This is normal behaviour.
Disconnect everything and you should have a KK 2.0 with a brand new 1.5 FW on it.
Happy Flight.
Here is a bonus video of flying the new KK 2.0 with FW 1.5.
Edit: Changed Pin layout according to Chris’s comments. Thanks.


First of all, thanks for the guide!
Second, I think you’ve got MISO and MOSI pins the wrong way. I think it should be like this, based on the ArduinoISP sketch code and 324pa’s datasheet:
Arduino Pin 11 – MOSI
Arduino Pin 12 – MISO
Anyway, my problem is that I cannot get it to work. I get
”
avrdude: Device signature = 0x1e9406
avrdude: Expected signature for ATmega324PA is 1E 95 11
Double check chip, or use -F to override this check.
”
no matter what I do…
Looks like avrdude picks up the arduino’s AVR instead of the KK2′s… Any ideas??
Disabling auto reset on my Diecimila results in “avrdude: stk500_recv(): programmer is not responding”.
Thanks
Hey Chris.
You’re totally right! It’s inverted. I fixed this now in the Guide.
Got it to work somehow…
So, I started all over, disabled auto-reset on the board and ran the following:
# avrdude -P /dev/ttyUSB0 -b 19200 -c avrisp -p m324pa -v
it went fine.
Then I tried:
# avrdude -P /dev/ttyUSB0 -b 19200 -c avrisp -p m324pa -v -e -U flash:w:/tmp/5/OpenAero2_B4_1.hex:i
I was getting “stk500_recv(): programmer is not responding” all the time, but one time it managed to succeed!
That took a while
Anyway, the MOSI/MISO connections are the way I wrote them
Dear Chris,
Sorry for the late reply.
Did you provide sufficient external power to the Arduino and your board? 5V from the USB might not be enough! I would recommend hooking up the Arduino to something stronger like a 12V power wall plug.
It is true that some of the boards are special because of their auto-reset that happens when you don’t want.
Did you try the command with arduino instead of avrisp at all?
If you would provide some details on how you disables the auto.reset and maybe retry with a stronger battery source, I would gladly amend the guide and include your findings!
I managed to do this update with an Arduino Nano. First I had some problems with avrdude/kkmulticopterflashtool trying to flash to the arduino instead of the KK2.0 board and displaying an error for the boards signature “Expected signature for ATmega324PA”. Fixed this by adding a capacitor of 22uF between arduinos RST and GND-pins. This disables the auto-reset of the arduino and it wont automaticly be receptable to flashing.
The other problem I got was “stk500_recv(): programmer is not responding”. Solved it by changing baudrate to 19200 (it was higher as default in KKflashTool).
Hi Kiwi,
Thank you for the helpful comments.
I could update the guide using your feedback. Was there anything else special going on?
Best,