Difference between revisions of "Kilobot charging - software"
From Kilobots
Jarmarshall (Talk | contribs) (Created page with "In this page, you can find information about software support for charging of the kilobots. For hardware charging information see Kilobot charging (hardware). == How to a...") |
m (Giovannireina moved page Kilobot charging (software) to Kilobot charging - software) |
(No difference)
|
Latest revision as of 14:15, 12 September 2017
In this page, you can find information about software support for charging of the kilobots. For hardware charging information see Kilobot charging (hardware).
How to add Charging Mode Button to the KiloGUI
If you are using the kilobot firmware 2.0 (see Kilobot Firmware), and you would like to have the possibility of setting your robots in Charging Mode, you can add a button to the KiloGUI to send a message with this Mode. The Charging Mode may be useful because you can visually check if the robot is getting charged (or not) through a feeble LED flashing. If the robots blinks, it is getting charged.
- 1. Download the source-code of the KiloGUI from GitHub: https://github.com/acornejo/kilogui
- 2. Compile it a first time to check if you have your system correctly setup
- On linux, you will need the following dependencies: dpkg-dev, debhelper, libqt4-dev, libftdi-dev.
- In Ubuntu, just run:
-
apt-get install dpkg-dev debhelper libqt4-dev libftdi-dev
- 3. Patch the code by adding the charging functionality,
- * Edit the file src/kilowindow.cpp
- * Add to the function
- static const kilo_cmd_t KILO_COMMANDS[] = { …… };
- the button Charging associated to the function CHARGE, by using this text:
- {"Charging", CHARGE}
- static const kilo_cmd_t KILO_COMMANDS[] = { …… };
- 4. Re-compile, install and run kilogui. Now, you should find the new button Charging in your KiloGui.