How To: Potentiometer Joystick over Serial using Arduino

14 Jun 2017 15:55 - 14 Jun 2017 18:34 #34534 by ScottBouch
Hi guys,

I posted this on the main Flightgear forum, and am including it here too, for reference:

http://www.scottbouch.com/flightgear-sim-arduino-serial-hardware-2-axis-potentiometer-joystick.html

Now the basics are figured out, adding more controls should be straightforward.

Cheers, Scott
The following user(s) said Thank You: timi

Please Log in or Create an account to join the conversation.

15 Jun 2017 14:56 - 15 Jun 2017 15:13 #34543 by ScottBouch
Just added a throttle too... albeit a potentiometer temporarily wired, and just taped to the side of the stick! But got it working! proper prototyping phase regarding how (not) neat it is!

Please Log in or Create an account to join the conversation.

16 Aug 2017 21:58 #35129 by ScottBouch
I just got the trim hat working!

I used a resistor network to an Arduino analogue input (saving using up 4 digital inputs), wrote some Arduino code to translate the 4 voltage levels into which switch is pressed, then used that to ramp up / down the trim values at a rate based on time rather than program scans.

It works very nicely indeed, but was another good Arduino learning curve!

All that's left to wire up on this stick is the trigger, but I'm not sure what to assign it to! Maybe parking brake toggle..

So all in all, this stick is only occupying 3 analogue inputs (x, y and trim hat), and one digital (trigger).

I'm using an Arduino Micro now for this, keeping my Uno more for experimentation of new things, rather than use.

Will update my web page with description soon.

Cheers, Scott

Please Log in or Create an account to join the conversation.

16 Aug 2017 22:07 #35130 by Algernon
Or radio PTT? Looking forward to flying with you using this :)

Please Log in or Create an account to join the conversation.

16 Aug 2017 22:38 #35131 by ScottBouch
Hi mate, thanks Radio PTT is also a very good idea.. is there a property in the property tree for PTT that will easily control teamspeak or mumble talk function?

Please Log in or Create an account to join the conversation.

16 Aug 2017 22:55 #35132 by Algernon
Teamspeak might be able to pick it up - it detected my joysticks, but I suspect it's different on Linux... mumble I'm not sure, but it's plausible. Definitely FGCom PTT, though, although it's of limited use. It's worth a look to see if TS recognises any of the control inputs when you try setting up the TS PTT

Please Log in or Create an account to join the conversation.

17 Aug 2017 00:35 #35133 by ScottBouch
Hi, I had a quick go at additing a Hotkey in TS, but it didn't see the stick.

Probably the issue is that this is not an HID compliant joystick, therefore TS doesn't know what to look for, as it's not a standard protocol (and also appears as a Serial device, not USB).

If there is a way to link the PTT function of TS (or Mumble) to FGFS, then this would be easy to implement in the same manner as the other controls, by affecting the property tree. Same goes for arranging different voip "channels" for different airfield radio frequencies and using either a radio real control unit (or your digital masterpiece) to select which channel to use...

Cheers, Scott

Please Log in or Create an account to join the conversation.

Time to create page: 0.080 seconds
Powered by Kunena Forum

PM Mailbox

You are not logged in.

Forum Search

Keyword