So I'm new to Arduinos and MobiFlight, but I feel like I have a good grasp on everthing. I have many swtiches and knobs already connected and working properly. However, I can't seem to get this baromer mapping set up how I want it with an Arduino.
I have a push-button rotary encoder connected to my Aruduino Mega. I have two devices set up in MF under the Arduino Mega - one for "Baro Knob" as an encoder, and another for "Baro STD Button" as a button. When I set up the input configs for each of those independently, they both work fine. However, when I have them both set up and active, the STD button works fine, but when I turn the knob on the encoder, with each click of the wheel, the STD mode is turning on and off. So for instance, I'll start at, let's say 29.96: I turn the knob one notch to the right and it goes into STD mode, but the baro reading has also correctly changed to 29.97. I can tell because I'll click the push-button and it will switch out of STD mode and the baro is set to 29.97. Then if I click one more notch to the right, it switches out of STD mode and the baro correctly goes up to 29.98.
I've tried changing the "Type" on the "Baro knob" device that I have set up on the Mega, but none of the different options changes this behavior. I also tried a different encoder just to make sure the one I was using wasn't faulty, and got the same result. It just seems like when turning the knob, every other detent is also pressing the button. Note that I'm using an encoder with a small board attached to it. I have the ground going to ground, and then the SW, DT, CLK pins all connected to pins on the Arduino and proper mapped in MF.
Any advice on how to not switch STD mode on and off while turning the encoder knob? Thanks!