19 mars 2011

How to configure a wiimote for EQASCOM (EQMOD driver) to control your telescope

If you have set up a goto system on a PC with EQMOD for your German Equatorial Mount, you probably now want to connect a joystick to it for fine manual tracking. The manual tracking is always needed at least to synchronize your goto on several known stars.
One of the best joystick for doing this is a wiimote! First of all, it's wireless. And secondly, if you already have a Wii at home, then, you already have a wiimote and then, it's free! Finally, I think that the wiimote has all the needed buttons for that usage. It could have been created for that!

The following explanations are not a real tutorial, but more an information about what I did to make it work for me, and it may also work for you...

Now, let's see what you need:
  • A wiimote. No need to use the nunchuk, nor the IR receiver.
  • A working bluetooth stack into your PC. Yes, your wiimote is a standard bluetooth device! But unfortunately, the Microsoft bluetooth stack is buggy and you'll need to find another one. I'm currently using the Toshiba's one, with great success.
  • A working EQASCOM driver. This is not discussed here.
  • The ppjoy parallel joystick emulator. Install this software that is needed to create a virtual joystick device.
  • The GlovePie scripting tool. It will allow us to map the wiimote buttons to the virtual joystick.
And here is a bit of the needed steps to make this awesome combination working:


  1.  You have to pair your wiimote with your PC. For this, you may have to push the little button that is behind the battery cover while you ask to your bluetooth stack to scan for the devices. Here is what looks like the Toshiba's bluetooth stack parameters window once the wiimote is paired:

  2.  Start GlovePie. It has a menu with useful direct links to some needed parameters windows for joystick configuration. Click to CP-settings and choose PPjoy to open the ppjoy configuration.


  3. Then, add a virtual joystick:

    Windows should then install the driver for a new joystick device.

  4. Back to glovepie, choose CP-settings and Joystick:


  5. Here, you'll probably have to put the virtual joystick as the default device:


  6. Now, the most important part! You are going to create a script into GlovePie: into the text area, type:

    // PPjoy configuration for EQMOD
    ppjoy.Digital19=wiimote.Right
    ppjoy.Digital18=wiimote.Left
    ppjoy.Digital16=wiimote.Up
    ppjoy.Digital17=wiimote.Down
    ppjoy.Digital0=wiimote.A
    ppjoy.Digital1=wiimote.B
    ppjoy.Digital2=wiimote.Home
    ppjoy.Digital3=wiimote.Plus
    ppjoy.Digital4=wiimote.Minus
    ppjoy.Digital5=wiimote.One
    ppjoy.Digital6=wiimote.Two

    You can save this script and put a shortcut onto your desktop for later use. Now, click on "RUN". Your wiimote should stop blinking and the first led should stay on.
    Some forums are talking about an EQMOD script that is packed with the distribution, but I didn't find it...

  7. You can test into the joystick advanced properties:


  8. Now, into EQASCOM, you can map the keys to everything you want:

    I could have made a GlovePie script that uses the default mapping, but as I already changed it during the different tests I made, I was too lazy to restart with the defaults ;-)
    You're done!
  9. Some have also mapped the wii movements, and not only the digital little joypad and buttons that are on it, but I find it totaly useless, and even dangerous as by night and in the positions that you can take with an equatorial telescope, you can see what may happen!
You can find at the end of THIS POST, a little video with the goto and the wiimote in action:

video



    Aucun commentaire:

    Enregistrer un commentaire