I’ve got a 4x4 Matrix keypad that I’d like to use with my Electron but I’ve been getting a compile error even with the example sketch. If I swap the device I’m compiling for to a Photon there is no error.
The error is in Application.h related to usb keyboard
In file included from ../wiring/inc/spark_wiring_usbkeyboard.h:33:0, from ./inc/application.h:47, from Keypad/Key.h:35, from Keypad/Key.cpp:30: ../wiring/inc/spark_wiring_usbkeyboard_scancode.h:15:26: error: expected identifier before '=' token KEY_H = 0x0B, // Keyboard h and H ^ ../wiring/inc/spark_wiring_usbkeyboard_scancode.h:15:26: error: expected '}' before '=' token ../wiring/inc/spark_wiring_usbkeyboard_scancode.h:15:26: error: expected unqualified-id before '=' token ../wiring/inc/spark_wiring_usbkeyboard_scancode.h:394:1: error: expected declaration before '}' token } UsbKeyboardScanCode; ^ make: *** [../build/target/user/platform-10Keypad/Key.o] Error 1 make: *** [user] Error 2 Error: Could not compile. Please review your code.
My issue is that I’m not exactly certain how to move past this? I tried to fork the library and remove application.h include to see what would happen but then I get undeclared types for the struct that includes “byte”, among many other errors. Using the SPARK_NO_PREPROCESSOR line doesn’t change anything.
Has anyone been able to get this working? I’d love to be able to just plug in a library with built in debounce, etc and not have to write my own.