I'm designing a system with a master board and a variable number of identical daughter boards that I would like to connect in a chain. The master board contains a microcontroller but the daughter boards don't contain anything intelligent. The master board will only connect to one daughter board, and each daughter board will be able to connect to a next daughter board.
I'd like to figure out a way for the master board to be able to detect how many boards are connected to it, and be able to send signals to each board depending on where that board is in the chain.
Does anyone have a good idea for this? The simpler the better.

