The dual rotary encoder with pushbuttons can be operated in rough air and keeps your screen tidy. It can be placed wherever you find a suitable place in your cockpit, no matter if oriented horizontally or vertically.
The dual rotary encoder with pushbuttons uses USB-HID (Human Interface Device) to send keystrokes to the OpenVario Flight Computer. The keystrokes are generated by an inexpensive Arduino Pro Micro, which is connected to the pushbuttons and the rotary encoders. The Arduino comes with an USB-Interface, which allows very convenient communication with other devices, e.g. the OpenVario. The Arduino Pro Micro can be programmed directly via the USB, so there is no need to buy a dedicated programmer hardware. The code was inspired from the following examples:
http://www.loiph.in/2014/09/arduino-leonardo-atmega32u4-based-usb.html
Arduino Leonardo Pro Micro Code ready to use
The pushbuttons are connected via 10 kOhm resistors to +5V, this method of wiring is called pullup. It provides reliable logical states at the inputs of the Arduino. Another important detail is to have a reliable GND for both, the rotary encoders and the pushbuttons. Two separate GND-connections and short wiring are recommended to achieve reliable operation. Builders who are interested in some more technical details will find valuable information about debouncing, detecting the direction of rotation and much more on the Arduino-Website.
The xci-event file defines, how XCSoar reacts when it receives keystrokes. You can customize the xci-file with an editor to perfectly match your personal needs. You can find a xci-event file example for xcsoar in the following directory:
/home/root/.xcsoar/openvario.xci
A ready to use dual rotary encoder input device can be obtained from http://stefly.aero/openvario/ All pictures and the Arduino code have been provided by Stefan Langer for the OpenVario project, thanks a lot!
The dimensions of the SteFly-Rotary Module can be found here:
http://stefly.aero/wp-content/uploads/2014/07/57OV_Rotary_V3.pdf
Here is a nice video on youtube showing the operation of the SteFly Rotary Module: https://www.youtube.com/watch?v=qppuKiylH_Y
Alternative Rotary Encoder Solutions can be found in the XCSoar-OpenVario-Forum https://forum.xcsoar.org/viewtopic.php?f=30&t=3106