identifying serveral extenders

hi, i want to identify extenders connected to my arduino by id or something else. What is the best (and easyest) way to do that? I thought about different resistors. Each for every different extender. Connecting it to an analog pin and read out the value. So i can sepparate all extenders by software. Is there a better way to do that?

thx Sunny