QuantumNoisemaker
Member
Hello folks,
I've been working on a fork of this Github repo (https://github.com/bertrandom/snowball-thrower) where the Teensy is emulating a nintendo switch controller. I wanted to add a matrix style keypad input to the Teensy 2.0++ to allow for user input when the program is running. However, the keypad example here (https://www.pjrc.com/teensy/td_libs_Keypad.html) is written in C++, whereas the code I'm working with is written in C. Is there a C version of the matrix keypad library that someone knows of, or is there a nice way to get the C++ code to work with C?
Some additional details:
Thanks for any input you can provide ! Been awhile since I've coded in C so I'm a bit rusty; if I'm making an obvious blunder please let me know.
I've been working on a fork of this Github repo (https://github.com/bertrandom/snowball-thrower) where the Teensy is emulating a nintendo switch controller. I wanted to add a matrix style keypad input to the Teensy 2.0++ to allow for user input when the program is running. However, the keypad example here (https://www.pjrc.com/teensy/td_libs_Keypad.html) is written in C++, whereas the code I'm working with is written in C. Is there a C version of the matrix keypad library that someone knows of, or is there a nice way to get the C++ code to work with C?
Some additional details:
- The Teensy matrix keypad documentation is the same as the arduino matrix keypad documented here: https://playground.arduino.cc/Code/Keypad/
- I am using C+makefile on windows 10.
- I am using a 4x4 matrix keypad wired to C0-C7 on the Teensy 2.0++. I have run the C++ matrix keypad code using Teensyduino and it works like a charm. But doesn't work with C+makefile code.
- Example of a matrix keypad and a project using it: https://www.circuitbasics.com/how-to-set-up-a-keypad-on-an-arduino/. I'm using the exact same 4x4 matrix keypad model as pictured.
Thanks for any input you can provide ! Been awhile since I've coded in C so I'm a bit rusty; if I'm making an obvious blunder please let me know.