Button connection
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
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() {
UI_KEYS_INIT_BUTTON_LOW(1);
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
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
Comments
I also doubt that pin 1 is correct. 0/1 are the serial connector pins. Make sure it is the arduino pin of the pin.
#if FEATURE_CONTROLLER == CONTROLLER_ADAFRUIT
You need to find the one with the value of your feature controller or with a symbol that stands for the name. Here the list for 8 bit controller:2 or CONTROLLER_SMARTRAMPS = Smartcontroller from reprapdiscount on a RAMPS or RUMBA board
3 or CONTROLLER_ADAFRUIT = Adafruit RGB controller
4 or CONTROLLER_FOLTYN = Foltyn 3DMaster with display attached
5 or CONTROLLER_VIKI = ViKi LCD - Check pin configuration in ui.h for feature controller 5!!! sd card disabled by default!
6 or CONTROLLER_MEGATRONIC = ReprapWorld Keypad / LCD, predefined pins for Megatronics v2.0 and RAMPS 1.4. Please check if you have used the defined pin layout in ui.h.
7 or CONTROLLER_RADDS = RADDS Extension Port
8 or CONTROLLER_PIBOT20X4 = PiBot Display/Controller extension with 20x4 character display
9 or CONTROLLER_PIBOT16X2 = PiBot Display/Controller extension with 16x2 character display
10 or CONTROLLER_GADGETS3D_SHIELD = Gadgets3D shield on RAMPS 1.4, see http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
11 or CONTROLLER_REPRAPDISCOUNT_GLCD = RepRapDiscount Full Graphic Smart Controller
12 or CONTROLLER_FELIX = FELIXPrinters Controller
13 or CONTROLLER_RAMBO = SeeMeCNC Display on Rambo (ORION)
14 or CONTROLLER_OPENHARDWARE_LCD2004 = OpenHardware.co.za LCD2004 V2014
15 or CONTROLLER_SANGUINOLOLU_PANELOLU2 = Sanguinololu + Panelolu2
16 or CONTROLLER_GAMEDUINO2 (in development)
17 or CONTROLLER_MIREGLI 17
18 or CONTROLLER_GATE_3NOVATICA Gate Controller from 3Novatica
21 or CONTROLLER_VIKI2 Panucatt VIKI2 graphic lcd
24 or CONTROLLER_ZONESTAR = Zonestar P802M with LCD 20x4 and 5 ADC button keypad
25 or CONTROLLER_ORCABOTXXLPRO2
26 or CONTROLLER_AZSMZ_12864
405 or CONTROLLER_FELIX_DUE Felix LCD für due based board
27 or CONTROLLER_REPRAPWORLD_GLCD = ReprapWorld Graphical LCD