The circuit I posted is not mine, it was the first example I could find of how I WAS wiring 2 LEDs to the same micro pin. The main circuit actually uses an Arduino Nano and I am literally out of pins, and the next largest option is supreme overkill, plus won't easily plug on to a PCB, that going to a Mega.
I was initially operating under the mistaken impression that extra two analog ports available on the Nano could be used as digital pins just like A0-A5. Considering the Arduino site itself claims 22 digital pins for the Nano. But the devil is in the details, on the ATMegas328P/U those two lines do not go to standard ports, they are direct feeds to the A/D converter. So, really 20 digital pins, and I don't want to connect anything to the serial pins if I don't have to, so I don't have to disconnect things to reprogram the controller.
What I have as far as pin usage:
2 pins for 2 servros. 4 pins for 4 pushbuttons, one pair per servo. 4 pins for relays, 2 per servo - one relay disconnects power while the servo moves, the second relay activates to change the power feed polarity, and then the first relay drops to establish he power connection, to prevent a short if the linkage between the servo and track switch is not perfect, 2 inputs from the master controller, active low with pullups, one per servo, 2 additional inputs from the master controller, active low with pullup, to lock out use of the pushbuttons, 2 outputs, one per servo, to drive the indicator LEDs, and 2 outputs, one per servo, to indicate whent he remove lock is enabled.
If you lost count that's 18 pins. Exactly how many I have available if I leave the serial pins 0 and 1 unconnected. I am open to suggestions, but I'd rather not add multiplexors that will complicate the code. An inverter on the LED line would be fine, but then I'm back to either getting +5 and GND to the control panel to locate the inverter there, or needing more wires to the panel that I have available. The problem with trying to multiplex the LED drives is there is a good bit of unknown timing in the code, as it will be writing the servo position to EEPROM using an incrementing counter and a pointer to spread the writes across the whole memory range for maximum endurance, plus timing can change based on the lockout status. I suppose I COULD use the two extra analog lines as inputs, and just compare a threshold, if below a certain level then the line is being pulled low by the master controller, if above a certain value it is either high or open circuited and being pulled up by an external resistor.