Energia sketch for a rotary encoder with push button that provides for coarse/fine adjustment.
The button is coded to increase/decrease the coarseness that results from turning the encoder. For example, the encoder can be set to increase or decrease the value by 100 with a turn of the knob. When the button is pushed it can be made to increase or decrease the value that results from turning the knob. This allows the user to rapidly change values or achieve fine control as desired.