Hi, Repetier,
I am using MKS gen 1.4 motherboard with reprap discount smart controller. I would like to add custom, keyboard, consisting of 6 separate NO buttons, in order to control my printer movements manually. I am having a trouble, making this alive... In uiconfig.h i add this:
#define UI_HAS_KEYS 1
void uiInitKeys() {
#if UI_HAS_KEYS!=0
UI_KEYS_INIT_BUTTON_LOW(1);
#endif
void uiCheckKeys(uint16_t &action) {
#if UI_HAS_KEYS!=0
UI_KEYS_BUTTON_HIGH(1, UI_ACTION_Z_UP); // push button, connects gnd to pin
#endif
I connect button correctly, but nothing happens even when i change ui_action (e.g. UI_ACTION_HOME_ALL) and button pin. Need your help!
Thanks in advance!
Best regards, Nikita