Board index FlightGear Support Hardware

Serial Input via Arduino: Different behaviour on two PCs

Joysticks, pedals, monitors.

Serial Input via Arduino: Different behaviour on two PCs

Postby Ju388L » Mon Oct 16, 2017 9:13 am

I am currently trying to transfer an existing, working Arduino (Mega 2560) serial input from one Windows 7 PC to a more powerful additional machine, which also runs Windows 7. Unfortunately, the "cloned" FlightGear 3.4 Installation on the new machine virtually freezes at "finalizing position" in the splash screen, then continues after what feels like a minute. At the BULK protocol level, the information that briefly appears is:

Code: Select all
fg_serial line =


By contrast, everything works fine on the old machine, where the same protocol level shows the expected input booleans with the desired default config, looped all over:

Code: Select all
fg_serial line = 0,0,1,1,1,1,0,0,0,0,0,0,0


What is even more confusing is that Arduino serial output, however, using a 2nd Arduino, works flawlessly from both machines. The only configuration difference between the PCs is that the working, older setup uses Arduino 1-0-5 r2, whereas the new machine runs Arduino 1.8.5 downloaded from arduino.cc

I have already tried to eliminate, rather systematically, the following potential sources of error:

    - The USB Hub and cable configuration used was exactly the same for both PCs
    - The Arduino serial monitor confirms that data are arriving as expected on both PCs, ports are set correctly
    - The latest FlightGear version shows the same behaviour...

One peculiarity on the "old" machine is that the Arduinos only work properly after they have once been "initialized" by checking them with the Arduino serial monitor.

Do you have any leads for me that I could additionally pursue in troubleshooting?
Ju388L
 
Posts: 3
Joined: Fri Oct 13, 2017 2:19 pm

Re: Serial Input via Arduino: Different behaviour on two PCs

Postby DutchAileron » Tue Oct 24, 2017 3:40 am

My guess is that they fixed some bugs in the serial code or interrupt handling. Update the Arduino SDK and recompile and see if you get the same results or different.
DutchAileron
 
Posts: 5
Joined: Wed Mar 29, 2017 8:48 am

Re: Serial Input via Arduino: Different behaviour on two PCs

Postby Ju388L » Tue Oct 24, 2017 9:18 am

Thank you very much for your message! Ironically, I was able to resolve the issue yesterday by "downgrading" the new machine to the older Arduino version. Of course, this is a very unsatisfactory solution, because I am not doing any "rocket science" with Arduino, and therefore, in theory, the Arduino version should not have such a dramatic impact. In fact, the old USB drivers run flawlessly with the code re-compiled with 1.8.5. I have not investigated any deeper, but my educated guess from a few tests is that it is actually the version of the Serial Monitor used for initialisation that causes the problem.
Ju388L
 
Posts: 3
Joined: Fri Oct 13, 2017 2:19 pm


Return to Hardware

Who is online

Users browsing this forum: No registered users and 4 guests