Generic Pitch Trim Hardware with Arduino Mega 2560

Support for Arduino in combination with Air Manager and Air Player

Moderators: russ, Ralph

Post Reply
Message
Author
onthemark40
Posts: 12
Joined: Mon May 31, 2021 7:45 am

Generic Pitch Trim Hardware with Arduino Mega 2560

#1 Post by onthemark40 »

I am setting up the Generic Pitch Trim Hardware for use with Arduino Mega 2560 rotary encoder with FS2020. I have the Arduino Mega 2560 on Channel B Pin A on D2 and Pin B on D3. When I try to run and test I get an error logiclua:34: Failed to bind hardware I’d’s to connected hardware. I know the Arduino Mega is working with those digital inputs because I modified the instrument Cessna 172-Elevator Trim Indicator/Wheel and it works fine. It appears that the hardware coding the the Generic Pitch Trim is not working and I can’t figure out why.

onthemark40
Posts: 12
Joined: Mon May 31, 2021 7:45 am

Re: Generic Pitch Trim Hardware with Arduino Mega 2560

#2 Post by onthemark40 »

I figured it out. Sometimes all it takes is writing a post 😀.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Generic Pitch Trim Hardware with Arduino Mega 2560

#3 Post by jph »

onthemark40 wrote: Sun Jun 06, 2021 5:56 am I am setting up the Generic Pitch Trim Hardware for use with Arduino Mega 2560 rotary encoder with FS2020. I have the Arduino Mega 2560 on Channel B Pin A on D2 and Pin B on D3. When I try to run and test I get an error logiclua:34: Failed to bind hardware I’d’s to connected hardware. I know the Arduino Mega is working with those digital inputs because I modified the instrument Cessna 172-Elevator Trim Indicator/Wheel and it works fine. It appears that the hardware coding the the Generic Pitch Trim is not working and I can’t figure out why.
Hi, unless I am not awake yet.. ;) to which 'generic' pitch trim do you refer - I don't seem to see one offered ? (AM 4)
Joe
Joe. CISSP, MSc.

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

Re: Generic Pitch Trim Hardware with Arduino Mega 2560

#4 Post by Ralph »

There's a hardware function for this. But there's a bug that does not let you select the pins. It's gonna be fixed in the next release, this week.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Generic Pitch Trim Hardware with Arduino Mega 2560

#5 Post by jph »

Ralph wrote: Sun Jun 06, 2021 8:37 am There's a hardware function for this. But there's a bug that does not let you select the pins. It's gonna be fixed in the next release, this week.
Hi @Ralph
Can you please point me at what you mean by a hardware function for this - are you talking about the purely global encoder ? HW Dial add ?
Joe.
Joe. CISSP, MSc.

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

Re: Generic Pitch Trim Hardware with Arduino Mega 2560

#6 Post by Ralph »

I meant this one.
trimhardwarefunction.jpg

onthemark40
Posts: 12
Joined: Mon May 31, 2021 7:45 am

Re: Generic Pitch Trim Hardware with Arduino Mega 2560

#7 Post by onthemark40 »

That’s the one. I have it working now with FS2020. It did give me the option to choose the Arduino type and the pins to use for the encoder. There were also options for potentiometer and momentary push buttons. Worked great!! I forgot to update Air Manager from the Beta version to the latest version which was the problem. Once that was done everything worked great.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Generic Pitch Trim Hardware with Arduino Mega 2560

#8 Post by jph »

Ralph wrote: Sun Jun 06, 2021 1:20 pm I meant this one.

trimhardwarefunction.jpg
Ah, yes I understand now :) Thanks Ralph.
Joe
Joe. CISSP, MSc.

onthemark40
Posts: 12
Joined: Mon May 31, 2021 7:45 am

Re: Generic Pitch Trim Hardware with Arduino Mega 2560

#9 Post by onthemark40 »

One thing I did notice was the Arduino selection and input pins are not being saved. Every time I start up the panel I need to reselect those setting. Other than that works great without issues.

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

Re: Generic Pitch Trim Hardware with Arduino Mega 2560

#10 Post by Ralph »

Yep, that's what I mentioned above. Also ADC pins do not show up in the Home tab.

Post Reply