There is only one reason for the technology of switching the LEDs in series: saving components.
For the LEDs in series, I need only one resistor per row, with parallel connection, each LED requires a resistor.
BUT: with the Arduino, the series connection has its problems when the breakdown voltage of the LED is at or above half the operating voltage. Then no voltage can drop over the resistor, since it must become infinitely small. With a breakdown voltage of 2.5V and two LEDs in series, 0V will remain, dropping above the resistor without lowering the 5V across the two LEDs. At 20mA and 0V voltage, according to Ohm's law, R = U / I, ie R = 0V / 0.02A = 0 ohms. U = R * I would be 0 = 0 * 0.02 - also correct I = U / R would be I = 0 / 0. Verschaf! Mathematically, a division by 0 is prohibited, so not possible! Thus, this calculation is not solvable. It will only become feasible if the breakdown voltage of the LEDs is below 2.5V. But by material scattering, one LED can have 2.4V, the other 2.6. Again not feasible. So as a minimum, 0,1V are necessary.
Now for the example with the 10 LEDs:
I anticipate the result: it does not work, or at least until the MEGA is fried.
Reason:
First to the wiring. From the external power supply the GND goes to the GND of the MEGA. Thus, both the MEGA and the external power supply have a common reference potential - namely the GND.
Viewing error: From each pin goes a line to the series resistor of the respective LED, from there to the anode via the LED to the cathode and the GND.
Now comes from the switch ONE line, which goes to LED1, then to LED2, then to LED3 ... LED10. The wire is soldered to the point BEFORE the series resistor.
Assuming that all LEDs are off, nothing happens at first. Now, when switched on via the SIM LED4, comes from PIN6 of the MEGA + 5V. These + 5V go immediately over the wire of the switch to all points in front of the series resistors, via the series resistor to the anode of the LED to the cathode to the GND. So ALL LEDs want to light up. Thats not OK. Assuming that the series resistor is designed for 10mA, 10 x 10mA = 100mA would flow through the output of Pin6, which immediately causes the voltage to collapse. Result: no LED lights. Since the outputs of the MEGA are not short circuit proof, this output inevitably burns through and is destroyed!
That's not how it works.
What would happen now if the new button is pressed?
All outputs of the MEGA are at approximately GND potential. Now come via the button + 5V to the point in front of the series resistors, the anode of the LEDs, the cathode to the GND. Result: All 10 LEDs are lit!
BUT:
The + 5V also go to the pins of the MEGA. Its outputs are at GND potential (approximately). The MEGA controls at its outputs so against this 5V, but it can not make it because the currents are too large.
Result: The output stages of pins 3 to 12 burn through.
So it is not synonymous.
So the problem is the direct connection of the outputs via the new button. Now you could solder the button leads between the series resistor and the anodes of the LEDs.
Does not work, because when the button is pressed, the LEDs get the 5V of the button WITHOUT resistor.
Result: all LEDs are burning!
So it is not synonymous.
In order to make your circuit operational, we need more components, namely 20 diodes, to decouple the leads of the probe and the pins of the MEGA.
This is done as follows: between the pin of the MEGA and the series resistor, a diode is inserted in the flux, ie pin - anode - cathode resistor.
This ensures that a positive voltage can flow in one direction only. The series resistors must be recalculated because about a diode about 0.7V voltage drops, which then drops less than the resistance.
So far, only 10 diodes are installed, thus protecting the outputs of the pins, even when the button is pressed. But still 100mA flow when an LED is turned on by any pin.
So the lines from the button must also be decoupled from each other.
Cable from the button to anode diode, cathode to cathode before the series resistor. Set up for all 10 lines - done.
What happens if PIN4 of the MEGA is pulled to 5V? 5V go to the first diode, then even 4.3V, which hit the series resistor, but at the same time on the cathode of the line from the button. 4.3V can not pass this second diode, because it is in the reverse direction. Then the 4.3V continue on the series resistor to the LED (LED lights). But only 1 LED lights up.
Now the button is pressed. 5V go via the button to the 10 anodes of the diodes, to the cathodes and the series resistor. There are the diodes to MEGA but in the reverse direction, so that nothing penetrates to the MEGA. Then the 4.3V continue on the series resistors to the LEDs and all light up.
BINGO - it works!
For question 1: answered
For question 2: answered
For question 3: answered
You see, your idea is not that stupid at all, it can even be realized - with a little effort, but realizable.
If desired, I also draw the schematics. Was not possible in a hurry ...
Grüße,
Stephan (Time: UTC+2)
