Relative beginner here, so excuse my ignorance if I don't know some basic Arduino capabilities. I have lots of coding experience, but I'm inexperienced with microcontrollers. I'm working on a little project in which components can be sequentially added to an assembly, and the controller will automatically incorporate the new components into the processing.
The basic setup is that each component is two rigid lengths with a servo controlled joint in the center. At first, there is one component, and so one servo, that is controlled by the Arduino along with some commands from a separate, more powerful processor (going to be doing some heavier math operations to determine commands).
I want to be able to attach another component to the top of the first one, introducing a second servo, which would then be recognized as part of the system and could be controlled by commands from the processor. Then add a third, fourth, etc. I want to do this without manually/physically adding each servo's input wire into a pin when you add the new component, but I would be alright with all the pins being initially filled at the beginning. At the moment I'm thinking that I can design the components to close a circuit when a new component is added, detected by a digital input, and then given that closure tell it to recognize the next servo. Or could all of the components be on the same circuit, and the system detects a change in resistance? Lots of options I think, I just want to make it as simple and elegant as possible.
Lastly, am I inevitably constrained by the number of pins available (no way to send separate output to more servos than you have pins)? I'm guessing not but I just want to check in case anyone had any neat strategies for that kind of thing.
My first priority is just to see if this is possible...does this sound feasible? Beyond that, does anyone have any advice or pointers that might help me out? Thanks for your time and help.