Difference between revisions of "Kilobot Firmware"

From Kilobots
Jump to: navigation, search
(Upgrade to Kilobot Firmware 2.0)
Line 23: Line 23:
 
: 2. If it's not done yet, update the firmware of the Overhead Controller (OHC) (see [[OHC Firmware]] for details)
 
: 2. If it's not done yet, update the firmware of the Overhead Controller (OHC) (see [[OHC Firmware]] for details)
  
: 3. Download the file [[File:bootloader.hex|bootloader.hex]]
+
: 3. Download the file [[Media:bootloader.hex|bootloader.hex]]
  
: 4. Set the OHC jumper to "external" mode as in this Figure
+
: 4. Set the OHC jumper to "external" mode as in this figure:
 +
:: [[File:Jumper out mode.jpg|300px|OHC jumper in external mode. Image source: http://ftp.k-team.com/kilobot/user_manual/Kilobot_UserManual.pdf]]
  
: 5. Connect the OHC to the PC through Usb, and plug the cable connecting the OHC to the kilobot as in Figure
+
: 5. Connect the OHC to the PC through Usb, and plug the cable connecting the OHC to the kilobot as in this figure:
 +
:: [[File:Kilobot-connection.png|300px|Connect the ICSP programming cable to the robot. Image source: https://www.kilobotics.com/documentation]]
 +
:: Gently press and tilt the programming cable to ensure a good connection.
  
 
: 6. Run (from the directory containing the bootloader file) the update command:
 
: 6. Run (from the directory containing the bootloader file) the update command:
Line 33: Line 36:
 
:: <code>sudo avrdude -p m328p -P usb -c avrispmkII -U "flash:w:bootloader.hex:i"</code>
 
:: <code>sudo avrdude -p m328p -P usb -c avrispmkII -U "flash:w:bootloader.hex:i"</code>
  
: 7. If you succeed, the robot should be happy and start vibrating in your hands the terminal message should say: <code>Fuses OK.      avrdude done. Thank you.</code> Similarly to this screenshot.
+
: 7. If you succeed, the robot should be happy and start vibrating in your hands the terminal message should say: <code>Fuses OK.      avrdude done. Thank you.</code> Similarly to this [[Media:Success-kilobot.png|screenshot]].
 
+
  
 
== Troubleshooting ==
 
== Troubleshooting ==

Revision as of 11:46, 29 January 2016

We recommend to use the firmware 2.0, which has a more stable code, more supported communication interface and allows working with Linux and MacOS. Additionally, most of the tools provided in this website require the firmware 2.0 to work properly.

Upgrade to Kilobot Firmware 2.0

The information reported here below can be found also on the kilobotics website (https://www.kilobotics.com/documentation).


NOTE:
You will only need to do this once. If you already have the latest controller firmware and bootlader installed, then you can skip the next steps.


We recommend doing the firmware upgrade from a Linux machine.

Here below, the steps to upgrade the kilobot firmware:

1. Setup of your Linux machine installing avrdude. For Ubuntu, use the following command:
sudo apt-get install avrdude
2. If it's not done yet, update the firmware of the Overhead Controller (OHC) (see OHC Firmware for details)
3. Download the file bootloader.hex
4. Set the OHC jumper to "external" mode as in this figure:
OHC jumper in external mode. Image source: http://ftp.k-team.com/kilobot/user_manual/Kilobot_UserManual.pdf
5. Connect the OHC to the PC through Usb, and plug the cable connecting the OHC to the kilobot as in this figure:
Connect the ICSP programming cable to the robot. Image source: https://www.kilobotics.com/documentation
Gently press and tilt the programming cable to ensure a good connection.
6. Run (from the directory containing the bootloader file) the update command:
sudo avrdude -p m328p -P usb -c avrispmkII -U "flash:w:bootloader.hex:i"
7. If you succeed, the robot should be happy and start vibrating in your hands the terminal message should say: Fuses OK. avrdude done. Thank you. Similarly to this screenshot.

Troubleshooting

1. Problem: The kilobot (that you're trying to upgrade) is not detected by the avrdude as connected through USB.
    Solution 1: Bad connection. Check that the OHC jumper is in the correct position
    Solution 2: Software failure. Try to reset the kilobot by removing and placing back its jumper
    Solution 3: Low battery. Place the kilobot on a charging dock for a few minutes and retry
    Solution 4: Damaged battery. Replace the kilobot battery


Firmware 1.0

In case needed, here you can get the firmware 1.0 (from K-team): File:KilobotFirstFirmware.hex


Links

For further information, check the kilobotics website: https://www.kilobotics.com/documentation

The source code of the firmware (both of OHC and kilobots) can be found here: https://github.com/acornejo/kilolib