Wednesday 20 May 2015

Ardupilot gamepad

So, in my pursuit to make my android GCS work with a gamepad, I have experienced some interesting introductory hurdles, but hurdles which all gamepads are experiencing.

My first and most ideal quest is to use a wikipad controller with my regular android tablet that I have. It was in a junk sale for $5, so I thought it might be a good thing to cut up and experiment with. I feel that it is an ideal shape and form for flying a drone with. It feels immediately comfortable in my adult-size hands.

I am hoping to enable QTgstreamerhud.apk with video via 4G:

What I have found with the wikipad (on a non-wikipad tablet) is that I can't get it to interface. It doesn't work with a usb-otg adapter, it doesn't work if I plug it directly, it doesn't work if I modify it with an HC-06 or HC-05 bluetooth adapter and connect through this. Why this is, I am unsure.

My initial plan was to plug it into the tablet, and use a controller mapper app such as tincore, to map the controls to those on the flight app such as VR pad/Andropilot/Droidplanner v1. But as such the wikipad is not functioning.

One google search on android tablets shows up that there is an issue with the bluetooth stack on android version 4.2. I am using this version of android on my tablet, so this might affect my ability to use bluetooth as a connection for a gamepad. To test this problem I also have a Nintendo Wiimote in my drawer that I tried to connect to my tablet. And, of course it will not connect. It connects to my windows laptop just fine.

To help me find some hope in this slowly descending project, I also have a Sony Playstation 2 controller with usb adapter that I use for PC laptop gaming sometimes. I know this controller works as I use it regularly. And sure enough, if I just plug it into my tablet using my USB-otg adapter it immediately works and I can control screen menu items. My optical mouse connects just fine in this way too. Hope..

So I can rule out bluetooth. It was probably going to increase control latency anyway.

But, I still like the wikipad form factor. It just feels like my perfect idea of a flight controller.

My next step, is to try to determine what is the difference between my working Playstation controller and the wikipad. Perhaps the wikipad controller has no HID interface chip on board? Perhaps they put the usb-host chip is inside the wikipad tablet and not the controller? Hmmm.

What can I do?

Well, I have an Arduino Pro Micro in a box somewhere... Perhaps I can use the ATmega32U4 chip it has to allow me to use it to connect directly over USB.

I guess it will be a full on gamepad DIY project. I will have to cut all gamepad switches and joystick wires, connect them the Arduino Pro Micro, map them as Digital-in or Analogue-in connections, and hope that this then works. there is no reason why it should not. I will then have a fully open usb controller.

Or, I could just use my Playstation 2 controller...But it has so much wire hanging off and no tablet mount. It just doesn't feel as good as a package.

I guess I could try to buy a wikipad tablet? But I don't want to spend $80+ for an experiment.

Wikipad options:
1) work on the USB interface
2) throw it in the trash, lose $5
3) try the bluetooth mod with a different tablet

Let's see.

No comments:

Post a Comment