Seahawk240 / Microsoft-FS2020-To-Arduino

A Simple Program which enables communication between a Serial Device (like an Arduino) and the Flight Simulator 2020
48 stars 7 forks source link

Serial wont work if connecting to FS2020 first and Arduino afterwards. #17

Closed Seahawk240 closed 3 years ago

Seahawk240 commented 3 years ago

As mentioned by @ollivier44 in his issue (see comment below) there is a problem which leads to the serial data transfer not working, if the Serial connection has not been connected before connecting to the Flight Sim. Hope to fix it soon.

Once again Thanks to Ollivier for bringing it to my attention! Greetings Matthias

Hello Matthias, Thanks for you answer ! I found the answer to my first question but I noticed something : I have to connect you EXE to my Arduino first, before connecting to FS2020, otherwise it doesn't work. Could you confirm that ? You can see here a screen shot : https://www.infobat3d-data.com/?dl=b9f58fcf4368e31c52c92a1bef858ae8 Stay healthy too ;) Regards, Ollivier

Originally posted by @ollivier44 in https://github.com/Seahawk240/Microsoft-FS2020-To-Arduino/issues/16#issuecomment-770690590

ollivier44 commented 3 years ago

Hi, thank you for your answer ! Ollivier.

Seahawk240 commented 3 years ago

Okay found the cause and a solution to this problem.

CAUSE: The Arduino defaulty restarts/reset the moment a serial connection via USB (UART) is established. Because the Arduino basically does a reset and the program bombards it with serial Data right in the middle of it, our little Arduinos get a bit confused, at least that's what I think.

SOLUTION: I inserted a little 1 Second Delay in the program, so that the Serial Connection can be established correctly.

ANYWAY:

That should fix the problem. If not let me know. Thanks again to @ollivier44 Greetings Matthias

ollivier44 commented 3 years ago

Hello Matthias, Thanks a lot, iI will try it ! Have a nice day ;)

Seahawk240 commented 3 years ago

Hello Matthias, Thanks a lot, iI will try it ! Have a nice day ;)

My pleasure, just keep in mind the new version isn't online yet, because there is one issue missing. I want to upload it within the next 2 days.

Greetings Matthias

ollivier44 commented 3 years ago

ok, no problem !