My newest development in interfacing arduino with input hardware

Graynomad:
I like the idea of having a total HMI interface in a single library.

Are all appropriate inputs debounced and if so is the time adjustable?

Encoders - grey scale as well as binary.

Keypads - X and Y configurable.


Rob

Rob,

Thanks for the kind words. All buttons and keypads are debounced but at the moment they are defined. This can be easily changed and the interface could support such functions easily. Encoder is not debounced since I am using the sequence {0,1,3,2,0,1,3,2,0} with a binary number that is made up by chnA and chnB combined. A successful dial click up or down has to follow all four numbers to register so this makes debouncing unnecessary.

The encoder keeps record of its orientation (0 to detent-1) you can call rotary_encoder.get_angle().

You may have any dimension for rows and columns.

All keypad subclasses are sensed and translated the same way with a char array of key names like:

char key_mapping_matrix[]={'1','2','3','A','4','5','6','B','7','8','9','C','*','0','#','D'};

All keypads also return NO_KEY just like the popular keypad library does.

If you start with an analog keypad LCD shield and then run out of buttons then you can just switch to a matrix keypad and don't need to change code since all the interfaces are the same. Only the underlying sense_all() is different for each type of keypad.