the resistors are very loose in the breadboard
They should not be loose. Is the breadboard damaged?
No, but it's quite old
I was looking at the code trying to see about advancing it a bit (see what I did there?) and I don't understand this, which looks to happen in two places at least
case 128:
userIn = btMatrix[0][i-1];
// and also
case 16:
userIn = btMatrix[0][i-1];
where just reasoning by pattern recognition one might expect the latter assignment to be
userIn = btMatrix[3][i-1];
The comment confirms the odd choice, so I wonder if is a leftover cut/paste/edit error.
This would make the fourth row (or column) be a repeat of the first. It is not important yet as it does not explain any difficulty, so just a heads up.
a7
OK! A new developement! I noticed that I was dumb (would use more strong language but I'm not sure about the rules here) and had wired the rows into the columns. I swapped them now and it seems to be working, only for like half of the buttons though. I suspect this is because of the code.
Is there a reason why you are not using Q0 pin on the '595?
It would make more sense to use Q0 to Q3 instead of Q1 to Q4.
After all, you are using D0 to D3 on the '165.
My bad, I am, the diagram is wrong
Ok, can you fix your schematic and post it again please, showing all the changes and corrections made since you last posted it? Then we can look at writing some simple code, from scratch, to scan the matrix.
Ok! Will do! By the way I do not have any capacitors on hand, so sadly I cant add any bypass capacitors, but I dont think that will impact a lot cause I have never seen anyone using them on shift registers.
I explained their importance earlier. If you don't believe me, there is no point in me trying to help you any further.
On Instructables, by any chance?
The arduino forum too, well, let me see, maybe I can steal some off a dead board
Yes, of course, posted by beginners like yourself complaining that their circuits don't work!
But the experienced forum members will almost always point out this error.
I know you've gotten the message, not piling on here, but this is the kind of cheap insurance it makes sense to take out. Or put in as is the case here.
I bought a lifetime supply of "bog-standard 0.1uF ceramic cap[s]" more than once, never thought I'd get this old…
It's the kind of thing Murphy loves… everything is fine until it isn't, and if you've decided to neglect and then forgotten the advice, you'll be tearing your hair out and mucking around looking for a problem where it isn't existing.
There are a few of those, and similar things in software. Just because you see ppl getting away with it, even most that you see, is not a logical reason to do (or not do) likewise.
I've hacked the code a bit, the good news is that the wokwi simulator has both chips and a 4x4 keypad (no diodes, but otherwise) 4 of which coukd make a full up 64 button scanned matrix keyboard.
I tested the omitted analog capability to ensure that the wokwi can handle chip inputs that are either pulled up or down correctly. I used virtual 20K resistors to test both.
If you don't know, now you know. It offers the possibility of dealing with perfect hardware, so issues that crop will be software. I often gets the software nearly perfect before I touch anything IRL, before sometimes I even know what board I end up using and so forth.
Ugh. No one here has ever made a mistake like that! ![]()
a7
will 10 uF work?
No, 100 times too high. Probably not ceramic, either, I guess? Probably electrolytic, I imagine.
there are some tiny ones, I can check what capacity they are at, but they are not ceramic
Ceramic are the best type for bypass caps. Their capacity is small but their reaction time is fast, which is what's needed, because the internal circuits in chips can also change fast.
Will 0.0001 uF work? They are ceramic
Sadly they are 3 orders of magnitude smaller
No, you need to find something of the same order of magnitude as 0.1uF, I think. The exact value is less important.
