On Sat, 2009-08-15 at 19:22 -0400, solarwind wrote: > I just thought of another idea: > > Rip open an old mouse and extract the phototransistor and infrared > LED. Mount each on the two forks of the bicycle so that they face each > other. When the spoke gets in the way, the light to the > phototransistor gets cut off and can be detected by the > microcontroller. > > Would this work? Yes, for a short while. Optical is never a good idea IMHO for something like this because it will get dirty (just one puddle would be enough) and stop working. TTYL -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist