i am building a box with a few encoders and buttons for my msfs. i found that some of my buttons work consistently. some don't work at all. and some work but not on every press so that i have to press it a few times for it to register. i enable the debug mode to that i can see if there is response to the button or not. have anyone seen this problem? i am new to mobiflight (but not to arduinos) so it is possible that i have missed something. any help is much appreciated.
#button don't work consistently
1 messages · Page 1 of 1 (latest)
If you enable logging mode in MF, the log should consistently show each and every button press and button release that you do on your buttons. If this is not what you see, then you most likely have bad connections between your buttons and your arduino. Soldered connections are the most reliable and are preferred to Dupont wire connections.
I have made several panels with Dupont connectors and don't really have any issues so far.
I think it is my switch that has a problem. The switches that didn't work are these (https://www.amazon.com/dp/B09C8BJ6RQ?ref=ppx_yo2ov_dt_b_product_details&th=1). They produce a voltage of 5v and .2v on the press and release of the button. This didn't triggered the arduino digital pin for some reason. I replaced the switch with a regular push button (https://www.amazon.com/dp/B09DLD6GH1?psc=1&ref=ppx_yo2ov_dt_b_product_details) and it works like a charm.
push button switch latching push button switch push button light switch metal push button switch marine push button switch push button switch 12v 12v push button switch maintained push button switch led push button switch round push button switch boat push button switch 12v latching push button s...
the correct wiring for using Mobiflight is
Arduino pin ----> Button switch ---> GND
that means, the pin sees 5v with the switch off or unpressed, and 0v when you press.
looking at the specs in Amazon, did you wire the yellow wire to the arduino pin and the green to ground?
no, i wired the green to 5v and black to ground. i was looking the provided picture for guidance
I guess you wired it incorrectly, then. As I mentioned, you need to provide ground to the arduino pin as the indication the button was pressed. You would wire one leg of the switch to the arduino pin, and the other leg to ground. There is no 5v wire in this setup. The led is handled as a separate circuit with its own arduino pin.
In your case the switch legs are the yellow (normally open) and the green leads (Common). The red and black are for the led.
green being the common leg, you would wire ground to that.
ok, I need to do some rewiring and will let you know how it goes. Thank you for your inputs!