Detecting each of up to 16 different things

[quote author=Coding Badly link=topic=130297.msg980219#msg980219 date=1351839025]

A little mirror with bits of evenly spaced black tape. [/quote]

Thanks for your suggestion, but have you ever tried sticking 16 strips of tape, evenly spaced, to a little mirror?
A laser printer will give me quite reflective white and black evenly spaced lines.
But that's not the problem. The problem is: when do you start counting?