Skip to content
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

2 keyboards in 1 board #27

Open
RiNoize opened this issue Feb 2, 2022 · 3 comments
Open

2 keyboards in 1 board #27

RiNoize opened this issue Feb 2, 2022 · 3 comments

Comments

@RiNoize
Copy link

RiNoize commented Feb 2, 2022

Hello Paul, I would like to know if it can be connected and how, 2 (two) Ps2 keyboards to the same board, I was trying but I can't make them both work at the same time. Thanks

@techpaul
Copy link
Owner

techpaul commented Feb 2, 2022

Without knowing what board you are using and EACH keyboard has its OWN interrupt pin, it is difficult to see what your problem is.

@RiNoize
Copy link
Author

RiNoize commented Feb 2, 2022

I tried with an Arduino mega pro (1 keyboard on pins 20 and 21 and the other keyboard on pins 2 and 3) and with an arduino pro micro (on pins 16 and 2 and the other keyboard on pins 15 and 3).
With 1 keyboard at a time, any of the two keyboards works perfectly, the issue is with both connected and declared at the same time.
I declared them this way in the pro micro:

#define DATAPIN 16
#define IRQPIN 2

#define DATAPIN2 15
#define IRQPIN2 3
uint16_t c;
uint8_t breaks = 0;
uint8_t repeats = 0;

PS2KeyAdvanced keyboard;
PS2KeyAdvanced keyboard2;

@CoreyOsgood
Copy link

CoreyOsgood commented Nov 25, 2023

I'm seeing a similar issue with an ESP32 and 2 keyboards. Comment out the code and individually either works fine. If both are set up, only keyboard 2 works. Most of the time the keypresses end up tripping keyboard1.available() and are read as if they came from keyboard 1, although sometimes it does come through on keyboard2. Keypresses on Keyboard 1 don't do anything.

DualKeyboardESP32Test.txt

EDIT: ps2kbdlib does work with dual keyboards on the ESP32. I also left the keyboard2 code commented out in the example, but I'm sure you can figure that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants