-
-
Notifications
You must be signed in to change notification settings - Fork 106
Buttons
First some basics to buttons.
- A human pressed button is closed for a minimum time of ~100ms, one is not able to press and release much faster.
- A delay of ~100ms between pressing a button and processing it's state will not be recognized by the user.
- Buttons debounce, they will close and open within severall µs, sometimes up to ms.
- Pressing a button is as important as release a button.
According 1) you have a lot of time to detect a status change of a button, and according 2) the user will not recognize this. After a signal change you have to be aware that multiple signal changes will occur, so debouncing is required. An "easy" solution is to check the buttons ~10ms for a signal change (there are also other methods also for heavy bouncing buttons or very old buttons), according 3) you will be for most buttons after there debouncing state and therefore you will get only one signal change. Doing it this way there is no difference between pressing or releasing, this fullfills 4). Using a pinchange interrupt will cause problems without additional measures. Every (or most) bouncing will lead to jump into the ISR (assuming the ISR is fast) and lead to detection of multiple key presses and time delays in the main loop (much more worse for reading encoders via pinchange interrupt). A time based interrupt every 10ms for reading the switches would be the preferred way (espacially when using long press or repeat detection), but with a lot of buttons it is also OK to set a flag or use millis() like done in the firmware.
- MobiFlight Connector Installation
- Mobiflight Connector BETA version installation
- Modules
- MobiFlight Connector Files Structure
- MobiFlight Connector Uninstall
- Modules Reset to factory default
- Verifying the WASM module installation and locating the MSFS2020 community folder
- Verifying the WASM module installation and locating the MSFS2024 community folder
- Using a Winwing FCU with MobiFlight
- Providing logs from MobiFlight
- MobiFlight Connector How does it work
- Mobiflight Connector Main Window
- Flash module with MobiFlight firmware
- Input and Output devices
- Joysticks
- Midi Boards
- Sim Variables (for Output)
- Input Actions
- Merging configuration files
- Disabling specific COM ports
- Examples Output LEDs
- Examples Input Switch
- Example 7 segment display
- Example Servo motor
- Controlling LEDs with an output shift register
- Adding lots of buttons with an input shift register
- Beginner's guide to input multiplexers
- Key Matrix with standard MobiFlight and Multiplexers
- Tutorial Easy Driver and x.27 or x.40 Stepper Motor
- Tutorial for Airbus VS display via 7-Segment LED Module
- Example Analog Input Potentiometer
- Baron G58 Tutorial Gear, Flaps, Mags, ELT Input Output Programming
- Using Mobiflight to control arduino-based 3rd party panels (RealSimGear GNS530)
- How to use a VNH2SP30 DC motor shield with MobiFlight
- Using 3D printer mainboards
- Playing sounds by sending keystrokes to AutoHotKey
- Using the selector knob on a Honeycomb Bravo
- Using an adjustable 12 position switch as a GA starter
- Brightness of LCD displays with I2C
- Using three-position switches
- Transponder with one Rotary
- Workflow for Creating Flight Simulation Panels ‐ Part 1
- MSFS2020 RPN Tips and Tricks
- MSFS2020 Using the Custom Input Code Box
- MSFS2020 Install WASM module and Event List
- MSFS2020 How to Create and Use User Defined Lvars
- MSFS2020 How to Create a Blinking LED configuration
- MSFS2020 User Defined WASM Module Events Best Practices
- MSFS2020 Developer Mode, Model Behavior dialog and Console window
- MSFS2020 PMDG 737‐700 List of Events that require use of FSUIPC7
- MSFS2020 PMDG 737‐700 Calibrate throttle idle and reverse thrust using interpolation (Valkyrie)
- MSFS2020 PMDG 737-700 Chrono unit functions implemented in Mobiflight
- Configuring PMDG 737 Parking Brake Lever Auto-Release with a Servo in Mobiflight
- Using encoder to drive a value back and forth within a given range
- Adding a custom board to MobiFlight
- User guide - Community Board and Custom Devices
- Developing your own custom devices/boards