Hi.
My first post here to the forum.
I am making a project that will control 51 LEDs, plus some auxilliary LEDs (12), so 63 in total.
I am connecting my rows & columns of a 8x8 matrix directly to the Arduino UNO board, using an Atmega 328.
I don't want to use a multiplexer IC.
Even though the LEDs are in a square grid, after perfecting my hardware and software, I will design a custom PCB in which the LEDs are arranged in a straight line, with all the same wiring pattern as was in the matrix of LEDs.
But for my 12 buttons, I don't mind using a multiplexer, or use rows and columns with varying resistors, and have the Atmega 328 sense which button was pressed, based on the resistance/voltage it measures, on an analogue in pin.
For the main 51 LEDs, only 2 will be on at any one time, so it will be a very low current output.
What's the best way to program this?
The buttons will be marked "UP 1", "DOWN 1", "UP 2", "DOWN 2", etc. etc.
When an UP button is pressed, the current LED gets incremented by whatever number (1, 2, etc.)
When a DOWN button is pressed, the current LED gets decremented by whatever number (1, 2, etc.)
After the new LED is turned on, a brief period of time, set by the user, roughly 40mS, the old LED is to be turned off.
That's the basic premise of it.
I could program this in BASIC, but I can't get Great Cow Basic to work on this computer. So.... I'm stuck
with the native coding for Arduino, unless someone can help me.
Thanks in advance
REM If you need clarification on any of these points, please just ask me.
END