I too have the same problem. Hardware was working fine with AM 3.7. Upgraded to AM 4.0.
Reflashed the (chinese knockoff) UNO from AM 4.0. Updated the plugins for FSX.
In the Home tab, it shows the Arduino as connected.
But the hardware only works from the "Create/Edit" tab when you click "Run". Only the hardware for the single instrument runs at that time. No errors are shown on the Console.
It's like the hardware isn't "starting" unless the "Run" button is pressed. However, changing the heading bug directly in FSX, for example, does change the heading bug on the AM instrument. The Instruments are working, just not the hardware.
Been poking around for an hour at this. Can't figure out what where the problem is. I'll watch to see if any solutions come up on this thread.
Edit: Ok, restarted the sim a couple times, restarted AM a few times, and restarted the panel a few times. Now it's working.
Not sure where the problem was ¯\_(ツ)_/¯
Arduino connected but not working after V4 upgrade
Re: Arduino connected but not working after V4 upgrade
So I need to execute my hardware set-ups on the first pass through the H/W script AND not do that until the Arduino is connected...
I've confirmed that I can detect when the Aurduino is connected or not with the hw_connected() function, and I also set-up a watchdog timer in case the Arduino never connects, and for now, I'm using the timer ONLY to see if I can simply hold-off execution of the HW setups for 4 sec
I've tried while-do and repeat-until loops to make the script wait - just crashes...
A timer wont work because the timers don't stop execution, they setup a timed interrupt.
Placing the HW setups inside an "if statement" wont work because they wont run on the first pass through the script
Obviously there is there a dedicated function or technique to suspend script execution because not everyone is having this problem, but I'm not seeing it yet. The digging continues...
I've confirmed that I can detect when the Aurduino is connected or not with the hw_connected() function, and I also set-up a watchdog timer in case the Arduino never connects, and for now, I'm using the timer ONLY to see if I can simply hold-off execution of the HW setups for 4 sec
I've tried while-do and repeat-until loops to make the script wait - just crashes...
A timer wont work because the timers don't stop execution, they setup a timed interrupt.
Placing the HW setups inside an "if statement" wont work because they wont run on the first pass through the script
Obviously there is there a dedicated function or technique to suspend script execution because not everyone is having this problem, but I'm not seeing it yet. The digging continues...
Re: Arduino connected but not working after V4 upgrade
Hi,
It shouldn't be so hard. Air Manager should dynamically connect to hardware without having to go through hoops in the lua code.
Is there a small lua example I could use to reproduce this issue?
Corjan
It shouldn't be so hard. Air Manager should dynamically connect to hardware without having to go through hoops in the lua code.
Is there a small lua example I could use to reproduce this issue?
Corjan
Re: Arduino connected but not working after V4 upgrade
I agree. In 3.7.10 it all worked automatically with no issue. In v4, my HW script works perfectly as long as I manually launch it in the create/edit tab and wait for the Arduino to show "connected" on the AM Home tab.
I also removed my hw script from the panel and re installed it. Same result, although I just did this again and noticed that in the instrument add list, there are two each of my h/w scripts (only one is active - others are older versions), but there is only one copy of each in my create/edit tab. Maybe unrelated but interesting.
Would a stripped-down copy of my script be the type example you are looking for?
I also removed my hw script from the panel and re installed it. Same result, although I just did this again and noticed that in the instrument add list, there are two each of my h/w scripts (only one is active - others are older versions), but there is only one copy of each in my create/edit tab. Maybe unrelated but interesting.
Would a stripped-down copy of my script be the type example you are looking for?
Re: Arduino connected but not working after V4 upgrade
Hi,
Yes, the smaller the better.
Please note that it should still present the issue off course.
Corjan
Yes, the smaller the better.
Please note that it should still present the issue off course.
Corjan
Re: Arduino connected but not working after V4 upgrade
I just saw the download log ability for the pi so I did that. Every one of my connections is saying “failed to bind hardware id’s to connected hardware.” I’m not using any special scripts. Just the ones downloaded from within air manager for hardware.
Re: Arduino connected but not working after V4 upgrade
Corjan,
I don’t think this is an issue of the connection happening but just when in the AM and instrument start sequence.
Let’s take an example of an instrument that has built in hardware features that is set to auto start after AM has started. If the hardware has not been recognised when this happens the hardware binding will fail.
That’s an example of my understanding of what the guys may be experiencing.
Air Manager panels at https://www.experimentalsimavionics.com
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Re: Arduino connected but not working after V4 upgrade
I just posted what I think is happening but I have a question related to that. If you wait until the Arduino is connected (appears at the bottom of the home tab left pane) and then run the panel does it still fail. If it does my theory on your particular issue does not run true because you have waited for the board to be recognised before trying to bind.jim_in_nh wrote: ↑Fri Apr 30, 2021 10:00 am I agree. In 3.7.10 it all worked automatically with no issue. In v4, my HW script works perfectly as long as I manually launch it in the create/edit tab and wait for the Arduino to show "connected" on the AM Home tab.
I also removed my hw script from the panel and re installed it. Same result, although I just did this again and noticed that in the instrument add list, there are two each of my h/w scripts (only one is active - others are older versions), but there is only one copy of each in my create/edit tab. Maybe unrelated but interesting.
Would a stripped-down copy of my script be the type example you are looking for?
I hope this makes sense.
I might have to test this for myself because it intrigues.
Air Manager panels at https://www.experimentalsimavionics.com
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Arduino connected but not working after V4 upgrade
Hi,
Yes i suspect what Tony says. On my system AM4 beta it takes about about 10-12 seconds for the grayed out arduinos to be become recognized. By that time the instrument script is well on it,s way.
Keith
Yes i suspect what Tony says. On my system AM4 beta it takes about about 10-12 seconds for the grayed out arduinos to be become recognized. By that time the instrument script is well on it,s way.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
Re: Arduino connected but not working after V4 upgrade
Hi,
I think I managed to find the issue.
Would you mind installing this AM BETA version and try again?
https://www.siminnovations.com/api4/dow ... n=HOME_USE
Corjan
I think I managed to find the issue.
Would you mind installing this AM BETA version and try again?
https://www.siminnovations.com/api4/dow ... n=HOME_USE
Corjan