Arduino connected but not working after V4 upgrade
Re: Arduino connected but not working after V4 upgrade
I’m not using any special scripts. Just making sure stuff works after the move from simvim. G5’s for example on a pi air player with pins connected to arduino. Mega 2560 is recognized, pins are all on right channel and spot, nothing happens in the sim. Even if I’m flying the default G5 cessna 172. Nothing changes on air player or x plane.
Re: Arduino connected but not working after V4 upgrade
The Arduino needs to be physically connected to the machine running the script that accesses the Arduino hardware.
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 have the script running on the pi. I plugged it into there and got no change. Sorry I forgot to mention that I tried that before. It comes up on the pi USB port and says connected. Just doesn’t do anything.
Re: Arduino connected but not working after V4 upgrade
Did you add the Arduino to Air Player Raspberry Pi from within Air Manager?
Re: Arduino connected but not working after V4 upgrade
I flashed it on air manager and then plugged it into the pi and hit the add arduino button and linked it to the Com port that came up for the pi if that’s what you mean. All from inside air manager yes.
Re: Arduino connected but not working after V4 upgrade
Sounds right. Maybe I've missed it, but which type of Arduino are you using?
Re: Arduino connected but not working after V4 upgrade
Oh wait, I see, a Mega2560. I will have to test next week.
Re: Arduino connected but not working after V4 upgrade
I’m going to do a clean install of both X-Plane and fs2020 too just to see if something else is interfering with the plug in.
Re: Arduino connected but not working after V4 upgrade
Back to the original question, I used a timer to check the Arduino connection status every second. (I first confirmed that the hw_connected() function worked as expected and it did.) But when the hw_connected() status goes true, and the HW setups finally run, I get this error message...
ERROR - logic.lua:864: Cannot initiate hardware ADC input outside of initial logic.lua execution
Makes me think that I'm going to need to kill time BEFORE the Arduino is connected, in the first pass of the script, and THEN run the HW setups all on the first pass of the script. In other words, the HW setups can't be inside a conditional response that is ever false. Is that true? Is that what this error message means?
Thanks as always,
Jim
ERROR - logic.lua:864: Cannot initiate hardware ADC input outside of initial logic.lua execution
Makes me think that I'm going to need to kill time BEFORE the Arduino is connected, in the first pass of the script, and THEN run the HW setups all on the first pass of the script. In other words, the HW setups can't be inside a conditional response that is ever false. Is that true? Is that what this error message means?
Thanks as always,
Jim
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Arduino connected but not working after V4 upgrade
Jim.
100's
The hardware has to be declared outside a function on the initial pass. or in a function that is called on the initial pass. {referring to init functions}
Keith
100's
The hardware has to be declared outside a function on the initial pass. or in a function that is called on the initial pass. {referring to init functions}
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