How it's work: When a player place a piece on (P1), 3 buttons will be pressed, each button on a different matrix. So button (R-L1-C1) is pressed, then on the code, I activate the multiplexer port X0, then the voltage divider will scan the resistor, and he found a value. Each value is associated on a number (from 0 to 5).
Demux is used for Leds to be activated when a piece is played (leds are RVB (Red=error, Green, OK, Blue=bonus score).
I love DIY projects, and I need to build an Electronic Triomino board for 2, 3 or 4 players.
Each player has an LCD to display score.
When a player place a piece on the board, the microcontroller need to calculate the position of the piece then the value of the the three numbers of the piece (ex: 3-5-0), I will use voltage divider for that.
I'm looking for NFC/RFID approach, but my reader must be 6mm diameter max and reading distance very short (1 or 2 mm). So matrix still very easy, with magnetic buttons
Specify - something will mechanically hold the button pressed or are we talking about its logical status? In the second case, you can mark the button as selected in the program and open it, so the matrix circuit is quite suitable
Ahh, a retro 80's game. Got one somewhere, haven't played in years. Following! SO you're using a triangular grid with sensors for all 3 tips of every element? Yea, that'll get complex, but doable. Every element has 3 corners, so resistive dividers tell the value. You're looking to scan all connection points, looking for analog values. That means you really want to scan pins to analog inputs, no? It's not just about the presence/absence, but the actual value at each locus, I think. Please clarify.
When I need a lot of switches I use an IR remote, only one Arduino pin is needed.
Software controls push on push off behaviour .
Not even close to 904 but maybe there is a compromise.
At this point, whether or not you use a matrix doesn't seem terribly important. More important are things like, how will you wire 904 pushbuttons, how far are they from the arduino, what environment (home, vehicle, industrial) are they in, how many do you need to be concerned with being pushed at once, etc.
Ahh, sorry. We discourage posters from updating their first post, because it makes posts that follow read like complete nonsense.
Thanks, I'll re-read it now.
By the way, I took a look at your code. Please consider the use of arrays, constants, and variable names. It does compile, at least.
And go to preferences and set compiler warnings to ALL. There are messages you should deal with, even at this point in development.