Matrix Keyboard controlling LinuxCNC

More
3 years 1 month ago - 3 years 1 month ago #280991 by panming
It still looks like something is wrong, when I set LedGndPins and rowPins to be the same and send M1:1,  the panel looks like this(first attachment)
The number is the name I gave them, if normal he should be numbered this way. After the number is the feedback value of the button, the green unit represents the LED flashing, and the red represents normal brightness.

when I set LedGndPins and colPins to be the same and send M1:1,  the panel looks like this(second attachment )I don't know what causes it, which two arrays should I set to be the same. Or do I have a problem wiring.
Last edit: 3 years 1 month ago by panming.

Please Log in or Create an account to join the conversation.

More
3 years 1 month ago #280992 by AlexMagToast
can you please post the settings you use in the second configuration?

The rowPins are Pullup Inputs, so they should not be used twice.
The ColPins are GND Pins for the Matrix Keyboard and the LEDs.
so set colPins und ledGndPins to be the Out0-8 Pins.

When you wire it like this and send M1:1 the all red numbers light up simultaneously?

Please Log in or Create an account to join the conversation.

More
3 years 1 month ago - 3 years 1 month ago #280993 by panming
yes,Yes, they lit up at the same time. And, when I type M1:0, they don't turn off, but when I type M2:1, several LEDs of M1 turn off.At the same time the third column began to light up, i.e. 2, 10, 18...
Last edit: 3 years 1 month ago by panming.

Please Log in or Create an account to join the conversation.

More
3 years 1 month ago #280995 by AlexMagToast
get the latest Code from Github.
It works in my test.

Also i think you misunderstand the use of the command.
the Number after M represents one LED. So looking at your table, each Number is one LED and can be written by one M code.
So only type M0:1 it should only turn on LED 0. (top left corner).
Also the way your keyboard is wired, i think it might be numbered differently.

ive changed the code to cycle through all the LEDs once / loop, therefore it should work better now, without the flashing.

Please Log in or Create an account to join the conversation.

More
3 years 1 month ago #280997 by AlexMagToast
i think i found a mistake, i'm working on it.
The following user(s) said Thank You: panming

Please Log in or Create an account to join the conversation.

More
3 years 1 month ago #281001 by panming
To prevent misunderstandings caused by translation software, I uploaded a video on YouTube.

Please Log in or Create an account to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum