RC India

RC Models => Multirotors => Topic started by: SK1701 on November 18, 2014, 05:20:18 PM



Title: Updating kk firmware with an Arduino (on a Mac)
Post by: SK1701 on November 18, 2014, 05:20:18 PM
My kk board firmware was out of date and flying was a nightmare. A USBasp tool was on the way, but being impatient, I decided to do it using my Arduino Uno for ISP (in-system programming). I used the setup described here: http://blog.oscarliang.net/flash-kk20-16-firmware-upgrade-arduino/, (http://blog.oscarliang.net/flash-kk20-16-firmware-upgrade-arduino/,) but since I own a Mac, I had to make several adjustments. Here are the steps (DISCLAIMER: This is the procedure I followed. I am not responsible if you destroy your Arduino, your kk board, your computer or your sanity):
1. Install the Homebrew package manager: http://brew.sh/ (http://brew.sh/)
2. Run "sudo brew install avrdude" without quotes. Enter the admin password when prompted
3. Download the latest kk firmware from Steveis's blog here: http://www.rcgroups.com/forums/member.php?u=367321 (http://www.rcgroups.com/forums/member.php?u=367321)
4. Make sure your Arduino IDE is up to date.
5. Connect your Arduino to your Mac and upload the ArduinoISP sketch
6. Power your kk separately (from one of your ESCs)
7. Connect your Arduino to the kk board using male-to-female jumpers. Check the diagram on the Oscar Liang blog. A 10uF capacitor is recommended but not vital. (I did not use one).
8. Run avrdude -P /dev/tty.usbmodem1411 -b 19200 -c avrisp -p m324pa -v -F from Terminal. Replace /dev/tty.usbmodem1411 with the address of your Arduino. For new kk 2.1 boards, replace m324pa with m644p
9. If all is well, you will get a message saying "avrdude done.  Thank you."
10. Now you can run: avrdude -P /dev/tty.usbmodem1411  -b 19200 -c arduino -p m324pa -v -e -U flash:w:"/Users/Siddharth/Downloads/KK2V1_1V18S1Pro/KK2V1_1V18S1Pro.hex":i
Again, replace /dev/tty.usbmodem1411 with the address of your Arduino and /Users/Siddharth/Downloads/KK2V1_1V18S1Pro/KK2V1_1V18S1Pro.hex with the path of your firmware hex file. If all is good, there will first be a 'Writing' step and then a 'Reading' step. Your kk LCD will become blank. This is normal. Once you get a message saying "avrdude done.  Thank you.", unplug everything and then reboot your kk board. It should now have the new firmware.



Title: Re: Updating kk firmware with an Arduino (on a Mac)
Post by: sooraj.palakkad on November 18, 2014, 05:28:18 PM
well, how is it's performance now ?


Title: Re: Updating kk firmware with an Arduino (on a Mac)
Post by: SK1701 on November 18, 2014, 05:28:54 PM
Haven't flown yet, I am going out. will tell you tomorrow.


Title: Re: Updating kk firmware with an Arduino (on a Mac)
Post by: SK1701 on December 15, 2014, 10:15:59 AM
While updating to version 1.19S1, I noticed that the link I posted does not work because of an extra comma at the end. Here is the correct link: http://blog.oscarliang.net/flash-kk20-16-firmware-upgrade-arduino/ (http://blog.oscarliang.net/flash-kk20-16-firmware-upgrade-arduino/) I also forgot to mention that in step 10, m324pa should be replaced with m644p for new kk 2.1 boards. If you get an error message, you can try replacing -c arduino with -c avrisp. @neil who contacted me, this link should help you if you decide to update with an Arduino Uno.


Title: Re: Updating kk firmware with an Arduino (on a Mac)
Post by: neil on December 15, 2014, 12:53:55 PM
Thanks