New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connecting to a membrane 3x4 Keypad without I2C? #1440
Comments
Hi @eman6576 Sorry nobody has responded. I'm not familiar with the membrane keyboard or the Raspberry Pi, but I think I can hazard a guess (and it's just a guess). The keypad requires tight timing when checking the pins. The commands required to toggle the pin state, check the values, and switch the pins back cannot be executed quickly enough over firmata/serialport. This limitation may not exist on the Pi, but it would stop the functionality from being added to Johnny-Five since firmata + firmata.js leads the way with functionality and drives where we go with the public API. Maybe it's possible to do with rasp-io. I'm really not sure. Maybe it's possible to go even lower and write something custom. Have you seen any examples (besides the i2c backpack) where the membrane keyboard is used in node? What are they using? |
@dtex The way that I am doing it currently is running a separate program in python that polls the keypad and prints to stdout the key entered. Then I am using python-shell to read in the output and handle it in Node. But I haven't seen anyone that has tried to do it in Node. But rasp-io might be the best place to add the functionality. |
Neat. Is the python program online somewhere? I'd like to see how it works. |
The project is closed source but I could post a sample project if you want to take a look. |
Membrane keypads like the one described here require synchronous digital pin read and write operations that interleave in nested loops (for each row, for each column) to determine "currently pressed button": https://github.com/rwaldron/johnny-five/blob/master/firmwares/keypad_3x4_i2c_nano_backpack.ino#L91-L107 This simply won't work with Node.js IO |
@rwaldron Yes I have tried that approach but the performance is terrible. In Python, you can use event handlers for detecting when a button was tapped which is better than using loops. It would be cool if that could be done here. |
Hello, I could get this 4x4 membrane keypad, directly wired on 8 GPIO pins, to work with Johnny-Five. Setup :
Source |
Hello,
I am working on a project that uses an Adafruit 3x4 membrane keyboard on a Raspberry Pi 3 Model B+. I read the documentation in regards to
12 Button Keypad
but it says that it requires I2C backpack. Does that only apply to Arduino boards? If so, is there another way to read input from the keypad using theBoard
class methods for interacting with pins?The text was updated successfully, but these errors were encountered: