![]() ![]() Boy when you get on a task in this Ubuntu it sure takes its toll in time and effort. I appreciate your taking the time to look this over. I think the throttle and the rudder may have been different in windows environment.Ħ. Seemed like the axis's were named differently in windows, but they worked fine. To prove it I ran same program in windows xp os. can you test if the stick works correctly on a different PC and/or OS?ĥ. It sounds a bit like either incorrect calibration or simply bad hardware, but I could be wrong. The manual ones start jumping around before I even get a chance to set the precise calibration. Only jscalibrator seems (from appearances within the jscalibrator interface anyway) to go smoothly. When I try to calibrate with jscal and other manual calibrations, I get garbage for calibration in axis 0 and 1. The bad apples are axis 0 and axis 1 which are ailerons and elevator The throttle is fine too, So are the views and all the buttons. It is axis's 0 and 1 which are causing all the problems. This doesn't seem right to me but I don't know how to correct it. So if you throw axis 0 all the way, axis 1 appears to track it. I get the -1 and 1 throws which you describe with two exceptions. What I calibrated it with is just about everything. what did you calibrate it with, and what does the output of js_demo look like? You should get values from -1 to 1 when you move the stick through the complete range of travel on each axis.ģ. You mentioned that you calibrated the stick. Configuration is at the bottom of this post, see below. Secondly - could you perhaps post your problematic joystick config so we could see it?Ģ. The exact name is Microsoft SideWinder Force Feedback 2 Joystick First, could you please let us know the exact name that your joystick reports (as seen in js_demo, for example) so that other people can benefit.ġ. I've tried to annotate the code to explain how it works: /* Flightgear hardware integration 01: Stick X and Y only so far.PostPosted: Sat 5:49 am Post subject: Reply with quote I modified the analogRead function to include an adjustable scaling factor (divide by 512), and an adjustable offset (subtract 0.99), these figures will be different for each stick and probably each axis depending on the hardware used, more on this under Calibration further on. The following code defines the input pins, and defines the variables used as outputs as float data type. I connected the X axis (roll / aileron) to A0, and the Y axis (pitch / elevator) to A1. This was repeated for the second axis (on pin A1). The potentiometer wiper is connected to an analogue input of the Arduino (A0), giving it a variable voltage between 0V and 5V. To supply 5Vdc to one end of the potentiometer and ground to the other end, these wires are connected to the 0V and 5V available on the Arduino boards. This wiring (and the code below) works seamlessly with the Arduino Uno and Micro boards. The stick also has a trim hat and trigger switches - these were not used for this article. It is made by Measurement Systems Inc (Ultra Electronics), and contains two precision potentiometers on a very nicely made 2-axis gimble. It is ex-Belgian Air Force, and was used for F16 pilot training / simulation, so is a nice piece of history. I was lucky, as a friend gave me this joystick / control column. Hardware > Arduino inputs > Serial over USB > PC > XML config > Property Tree Joystick This involves configuring Flightgear to make use of the received data, and setting up an external microprocessor (in this case an Arduino Uno, but also tested with an Arduino Micro) to send the data in the format and order that Flightgear is expecting to receive it. Overviewįlightgear Flight Simulator (FGFS) allows modification of internal parameters (or Properties) by several means, the method used here is serial data arriving at the PC from a stick and some electronics. I've split the guide into two main chunks, one for Arduino programming, the other for Flightgear programming. I've tried to keep this guide technically as simple as possible, but have written it in a way that hopefully fully explains each step. This guide can be used for any home-made / home-brew / diy joystick or control column, rudder pedals or throttles - Just watch out for cheap carbon tracked potentiometers / variable resistors go for high quality (if possible, precision potentiometers) to avoid "jumpy" controls. This was carried out with a Linux Mint PC, but shouldn't take too much head-scratching to use it for Mac or Windows. Getting this to work was a great learning curve! ![]() This is how I managed to make an analogue joystick / control column with potentiometers work with Flightgear flight Simulator (FGFS) over serial data comms, using an Arduino as the interface. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |