Arduino Nano Every ( MegaAVR board) Serial
Closed this issue · 1 comments
I am developing a MIDI controller in which I have hundreds of SysEx strings to be triggered to control a Korg synthesizer, and when I saw the possibility of using a PS / 2 keyboard it became a reality, to be able to use all the keys plus the CTRL , SHIFT and ALT combinations, made my world bigger.
I am using a Genius kb 125 Ps/2 keyboard and an Arduino Nano Every, I have tried with other arduinos but I need more Ram memory and the Nano Every meets my needs for memory and for the physical space that I have inside the qwerty keyboard.
Your library is fantastic for the task I am developing, the problem I have is that when I want to activate the NUM LOCK, CAPS LOCK or SCRL LOCK keys the Serial port is frozen, I have to close and open the Arduino IDE serial monitor so that the serial release and continue using the keys.
With the Arduino PRO MICRO it works well, I press the NUM LOCK key (101, FA, FA), the respective led lights up and the numeric keys are enabled, everything working normally.
With the Arduino Nano Every on the serial monitor I can see this: (101, FA) and the serial is frozen, I have to close and open the serial monitor to be able to use the keys, and the numeral keys are not enabled.
Also try to use: keyboard.setLock (PS2_LOCK_NUM);
and the serial monitor shows: PS2 Advanced Key - Advanced Test:
Invalid Code received of FA.
From now on I appreciate your attention and your library.
Richard
First of all this is a board NOT tested (ther are TOO MANY to test each one. You are welcome to do experiments to add support see Readme.md in the top level of code section of this reposirory (and installed onto your libraries folder tree.
You are welcome to make tests and provide suggested fixes especially if this works for all cases including sending LED values.
For adding boards that have been tested see as startiing point Porting.md in the folder extra under PS2KeyAdvanced library (or in code section) of this repoitory..
Most likely cause is how on YOUR BOARD the MCU in use handles interrupts or has other issues with stack overflow or similar issues like interrupt on falling edge is actually a LOW level of ANY CHANGE interrupt causing issues.
I do not have the time to check what interrupt methods those MCU use as it takes time to find and test for every historic and strange board., so you are welcome to suggest fixes that have been TESTED.
Secondly the boards you are using are these days EXPENSIVE and LARGE. For small tasks in my paid work I would start with something like Infineon XMC1100 XMC2Go which is
- CHEAPER (I can buy locally at around 5GBP plus taxes in one offs)
- SMALLER than either of your ones
- Has 32 bit ARM processor at 32 MHz
- Has Hardware PWM
- Has board support library for Arduino see https://github.com/Infineon/XMC-for-Arduino (I contribute fixes to this regularly)
- Larger memory 64k Flash and 16k RAM
See https://www.infineon.com/dgdl/Cube2_2GO_kits.pdf?fileId=5546d4614d7658ff014d902033af0025