Flashing KK2.1 with Arduino Mega 2560 in 4 Steps
Today i figured out how to flash your KK2.1 flight controller with an Arduino on Windows 7. You need:
1x Cable to connect arduino to kk (see picture below for a diy cable)
External battery to connect to your KK.
Download the Arduino Software and install (click here)
Download KKmulticopterflashtool and install (click here) rename extracted folder to kkflashtool as we use this in cmd.
Download the firmware for flashing your KK2.1.
First you connect your Arduino to your PC using USB. Start the Arduino IDE and in File->Examples-> klik on ArduinoISP and upload to your Arduino. This step will make the Arduino a programmer. Disconnect the Arduino.
Wire up the Arduino and the KK 2.1 board according to the following pin layout. Arduino Mega 2560 Pins
Arduino Pin 53 – SS / Reset
Do NOT connect Vcc from the Arduino to the KK 2.1.
Connect one of the ESCs to the KK board
Next you want to make sure that your Arduino is powered through the USB
Connect the KK 2.1 to an external battery
Make sure that everything is powered and connected, you can then try running the following command from the command line :
"C:\kkflashtool\lib\avrdude\windows\avrdude" -P COM4 -p m644p -c avrisp -b 19200 Set the correct path where the files are located and replace COM4 with the port you are using for you arduino If all goes right you schould get a Device signature something like : 1x1e899a when all is zero something is not good.
"C:\kkflashtool\lib\avrdude\windows\avrdude.exe" -P COM4 -b 19200 -c avrisp -p m644p -v -e -U flash:w:C:\kk2.1.hex:i Again set correct path and replace COM4 and C;'kk2.1.hex with full path were firmware is located. Exactly follow the steps above. If everything went well you schould see it writing, reading and finishing with a message "Thank You". Disconnect everything and check your KK with the new firmware.