I would beg for help!
It is an Arduino and a TM1637 display.
For testing and learning, I used a classically connected keyboard via multiple digital pins and it works satisfactorily, nicely for me.
Now I'm trying to control the 3 x 4 keyboard via one analog pin and it doesn't work.
Can someone explain the code to me step by step?
How to make a mapping for 12 keys?
How can the display show me each key pressed (number under that key)?
I only manage to get the number, but the next time I press, the new number is written over the old one, and not to be moved one place to the left on the display.
For example, I want to enter a 123 number, the program will only enter 1 or only 2 or 3 depending on which key I press.
By the way, I have already used the keys on one analog pin and they work fine, but with this project I don't know how to print on the display.
For now, I don't have any code, only test code, and they refer to the classic keyboard connection.
I would ask for any help to understand what the problem is.
Many, many, many thanks!
It is not a conventional diagram I can’t read it.
What are the components that are shown as a circle?
They can’t be push buttons because sometimes they have two connections and other times have only one connection.
That is because that is all your code tells it to do. In order to do more you need not only to code the removal of the original digit and show it one place to the right but also you need to decide what will indicate you have finished a multi digit number.
While you can identify different keys by looking at the voltage you can only do this if only one key is held down at any one time. This is a limit of this design. If you hold two or more the the result will be consistent but rubbish.
The 2 pins upper overlap and the 2 pins lower also overlap.
I only used 2 overlap pins on one side so I didn’t draw all 4 pins on the keys.
ARD is Arduino, more precisely Arduino mini PRO 5 volts.
At the anal input A3 is a 100nf capacitor to reduce interference.
These 7 resistors serve to get some kind of voltage divider.
If necessary I will draw a better scheme?
Up in my post # 3 which is invalid due to badly transferred code on the forum you can see the values I typed as a range for each key, I read them from the serial monitor.
Later I just changed to voltage and wrote the voltages in the valid code.
Hi,
Have you looked at the Examples in the IDE that come with the TM1637Display, they should have code to select which digit goes where.
I have a suspicion that;
Sorry, I didn't put any description in the code.
display_0.showNumberDec(num);
It doesn't set to zero, ignore the zero mark, it's a mark for me because I use multiple displays
In the code, when I press the button, the display shows the number.
That's ok, but when I press the second key, the second number appears on the display but instead of the first,
With LiquidCrystal LCD, it's simple, I type the place where I want the cursor and it writes to me, but I can't do that on this display.