Arduino connected but not working after V4 upgrade

Support for Arduino in combination with Air Manager and Air Player

Moderators: russ, Ralph

Message
Author
jim_in_nh
Posts: 40
Joined: Sat Apr 11, 2020 11:54 am

Arduino connected but not working after V4 upgrade

#1 Post by jim_in_nh »

Hi folks,

I upgraded to V4 in anticipation of going to FS2020. I've re-flashed my Arduino MEGA 2560, and it shows "connected", but none of my controls are working.

Is there a something I need to add or change to my hardware script to make the Arduino play with V4?

Thanks, and sorry if I missed an upgrade instruction or something.

Thanks,
Jim

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Arduino connected but not working after V4 upgrade

#2 Post by Ralph »

If you flashed your Arduino(s) in version 4 then that's all. Try with starting your instrument from the Create/Edit tab. Use prints, to debug, etc...

User avatar
Corjan
Posts: 2936
Joined: Thu Nov 19, 2015 9:04 am

Re: Arduino connected but not working after V4 upgrade

#3 Post by Corjan »

Hi,


Make sure to add your Arduino using the 'Add device' button on the top.
Air Manager 4.0 does not automatically search for connected Arduino's anymore.


Corjan

jim_in_nh
Posts: 40
Joined: Sat Apr 11, 2020 11:54 am

Re: Arduino connected but not working after V4 upgrade

#4 Post by jim_in_nh »

Yep, I added the device and I have re-flashed, from inside V4. Good idea to launch from the create/edit menu...works fine that way!

So what would cause the script to NOT start directly, as it did in 3.7.10? I confirmed the script IS in the panel, and it was launching normally in 3.7.10.

Is there a chance that in V4 the panel script is calling something before the arduino is connected? Is there a function to make the H/W script not run until the Arduino is recognized?

Thanks as always!
image.png

chefpilot
Posts: 90
Joined: Wed Aug 02, 2017 12:51 pm

Re: Arduino connected but not working after V4 upgrade

#5 Post by chefpilot »

Hi,
I have roughly the same problem. After a while (normally 2-3 minutes) everything is fine when connecting one arduino to Air Manager. However I have hugh problems when trying to connect an arduino to Air Player. I was able to have one arduino working with Air Player but it is not very reliable. I never had a chance to connect more than one arduino.
Any chance to solve the problem?
Marc

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Arduino connected but not working after V4 upgrade

#6 Post by Sling »

jim_in_nh wrote: Mon Apr 26, 2021 6:23 pm Yep, I added the device and I have re-flashed, from inside V4. Good idea to launch from the create/edit menu...works fine that way!

So what would cause the script to NOT start directly, as it did in 3.7.10? I confirmed the script IS in the panel, and it was launching normally in 3.7.10.

Is there a chance that in V4 the panel script is calling something before the arduino is connected? Is there a function to make the H/W script not run until the Arduino is recognized.
Are you using named hardware? If so are all your hardware allocations in the settings still all correct?

Yes there is a way to not run the script until the hardware is connected. See the API wiki for details on the hw_connected() function.

jim_in_nh
Posts: 40
Joined: Sat Apr 11, 2020 11:54 am

Re: Arduino connected but not working after V4 upgrade

#7 Post by jim_in_nh »

Ok. I'll check-out the hardware connected thing and see if holding off fixes it. Thank you. I'm guessing sit in a loop waiting on connected=true or a watch dog timeout? H/W script runs fine if manually launched from Create/edit tab. No changes to the script in months.

Thanks again!

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Arduino connected but not working after V4 upgrade

#8 Post by Sling »

Just thinking out loud. Perhaps using a timer and checking once a second for say 60 counts. You could initially add in a message to display the connection time or if you reach the 60 sec timeout.

Mccluress
Posts: 30
Joined: Wed Apr 28, 2021 10:28 am

Re: Arduino connected but not working after V4 upgrade

#9 Post by Mccluress »

I am having the same problem but I just switched over from simvim. I flashed the arduino and it is recognized and saying it’s working but nothing works on the sim. If I put print messages in the debug I can see it all working. My instruments I’m controlling and the hardware are all tied to an air player. Do I need to connect my arduino into the raspberry or my computer? I’m plugged into the computer right now. I’ll try the raspberry next time I go up. Just at a loss right now.

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Arduino connected but not working after V4 upgrade

#10 Post by Ralph »

If the prints are working, then are you sure that the message (command?) reaches the simulator?
Also it's hard to say without seeing any script(s).

Post Reply