Share My Creation Control a RC plane with a joystick

blade.jpg

Here is something I did for a copter pilot who wanted to "feel" RC copters and planes as if he were flying.

So he asked me to do an interface between a joystick and his RC radio.

I built this simple usb board which can connect any USB host device and which is seen as a HID device.
The board outputs ppm signal which is a standard interface to RC radio.
carte_connectique.jpg


Now the tricky android part :
- my board is connected to the USB host plug
- the joystick is also connected to this Android usb host

The App connects to the two usb devices, reads the joystick, decommutates the values, feeds them to my board. And that's it

JoystickAndroid2ppm.jpg


[edit Xmas 2015] : Thanks to @wonder wonder(ful) generic gamepad my App should be able to read almost any joystick.

You can test it with your own joystick. If the "left" part of the screen moves, then the app should work for you too (tell me your joystick model).
The buttons can be different from one joystick to another...

The Apk is attached to this thread

Here is a video :

 

Attachments

  • JPJoystick2ppm.apk
    363 KB · Views: 1,029
Last edited:

freedom2000

Well-Known Member
Licensed User
Longtime User
This was my very first app with B4A, there are for sure better ways to code (the rotary knob for instance)... but simple to understand and works !
 

john mad doe

Member
Licensed User
Longtime User
Hi Freedom2000

I bought a adaptator usb to connect my joysticks.

I have tested 3 different joysticks and none is detected:

- saiteck X52
- saitek AV8R
- KG13 (based on Leo Bognar Joystick Controller BU0836A)


:-( too bad !

John
 

freedom2000

Well-Known Member
Licensed User
Longtime User
Hi John,

Is your Android supporting USB On the Go ?

When connected and detected by android the joystick is more or less seen as a "random keyboard".
 

john mad doe

Member
Licensed User
Longtime User
Is your Android supporting USB On the Go ?


Well , not sure to understand the question.

what I can say is that your application says " joystick not supported"
 

freedom2000

Well-Known Member
Licensed User
Longtime User
Well I mean : does your android recognize the USB Host adapter ?

In other words, is the joystick recognized by Android system even when my App is closed ?
 

sorex

Expert
Licensed User
Longtime User
just wondering... what is the max distance you can have?

I thought blutooth only covered 10m or something and was just an extended solution to the infrared method (and worked out of focus unlike IR) ?
 

Troberg

Well-Known Member
Licensed User
Longtime User
It's not BT to the airplane. The joystick is connected to the phone, the phone is connected to the radio, the radio controls the aircraft.
 

freedom2000

Well-Known Member
Licensed User
Longtime User
yes you are right !

The max distance is thus only limited by to transmission power of the RC radio.
With mine, in open air conditions, I have successfully reached 2 km :)
 
Top