MikroKopter

Introduction

MoteCtrl is a small terminal-based programm written by Alpin, which lets you control your MikroKopter with a Wiimote. You can download the full release package, including the sources, here.

Please read the READ_ME_NOW.txt file before using MoteCtrl.

Description

MoteCtrl is a small terminal-based programm, which acts as an interface to the Wiimote and the MikroKopter platform. The MikroKopter is usually controlled by a normal 35MHz remote control. However, the FlightControl software also allows you to control your MikroKopter with a so called ExternControl struct, which is send via the serial communications line. MoteCtrl.exe, running on your windows pc, exactly does this. It captures the Wiimote's and Nunchuck's (extension to the wiimote) data and transfers it to the FlightCtrl.

What you need


Short Checklist

(for more detailed step by step instructions, see =Usage of MoteCtrl=)

Controls

Usage of MoteCtrl - Step by Step

Preparations

  1. Make sure that all the items listed under "What you need" work
  2. To allow external control you have to allocate a switch of your normal 35MHz RemoteCtrl to the "External Control" variable in the MikroKopter-Tool. You should find this option in the MK Tool -> Configuration/Settings

Explanation: Your normal Remote Control is always used as a backup device, in case the operator at the Wiimote looses control of the Quadrokopter or the Bluetooth connection is somehow interruted. Therefore the backup pilot at the 35MHz control can pass the control to the pilot with the Wiimote via his "external control" switch. If he feels that the Quadro is out of control or the connection is interrupted he just flips the switch back, gets control himself again and can rescue the poor -out of control- MikroKopter ;-)

Flight

  1. Turn your MikroKopter and your normal remote on. Make sure everything is running perfectly (perhaps do a "normal" test flight to check everything's ok)

  2. Establish the wireless UART connection to your Mikrokopter with your Bluetooth stack. The BT stack should assign a windows COM Port to the established connection, so you can access it (make sure Serial Port Service is running). You need to remember the NUMBER OF THE COM PORT, e.g COM4. So you established the link to your MK.
  3. Next establish the connection to the Wiimote:
    • Press both, the 1 and 2 Button at the same time. All the 4 LEDs should be blinking now. Your wiimote is now in "discovery mode", which means it is searching for a little Nintendo Wii to pair with it.
    • Now we are (or our BT stack is) the Wii: While the wiimote is in discovery mode search for devices in your BT stack program. You should find the wiimote now. Do NOT pair with it. Rather search for services the wiimote offers. This should bring up the HID (Human Interface Device) service offer. Check that the wiimote is still in discovery mode (only 30 seks active) and activate the HID service. You should now be connected with the wiimote and the 4 leds of the wiimote should still blink but shouldn't stop blinking anymore.
  4. So the BT stack is now connected to both, the Wiimote and the MK (BT can connect up to 7 devices at a time). Now start the MoteCtrl.exe via a windows commandline. Make sure you put the wiiuse.dll in the same folder like MoteCtrl.exe, otherwise the program will return immediatly without an error message (and you think huh?).

  5. Next you should be asked for your COM Port number, which is linked to your MK. Type in the number, hit enter.
  6. Next is the Wiimote initalizaition. If you your HID service is running everything should be fine now and MoteCtrl connects to it.

  7. Your Wiimote should rumble now for a sek and the LEDs should have stopped blinking (now only LED 1 is permanently on). --> This tells you, that MoteCtrl established the connection to the Wiimote successfully.

  8. You should now see the DEBUG Output scrolling down your terminal screen.
  9. First familiarize yourself with the new Wiimote's and Nunchuck's controls, with the engines of the MK deactivated. Watch the Debug output changing its values while you play with the Wiimote & Nunchuck. For Controls, see the chapter =Controls=.

  10. Flight: Your MAX GAS is always limited by the gas value, which is set at the backup pilot's 35MHz remote. So the backup pilot "gives you a limit" of the GAS value. The backup pilot can now pass the control up to you by using his "External Control" switch ;-)

Useful Tips & Practical Experiences

Credits & Thx

Sources

SVN Browser view

SVN Repository Link

Discussion Thread

http://forum.mikrokopter.de/topic-7222.html



MikroKopter: en/MoteCtrl (zuletzt geändert am 07.09.2010 09:18 durch IngoBusker)