I did this as a practice project for building a gear indicator for my motorcycle. The idea is that by monitoring the revolution speed of the rear wheel and of the driving pedal I can calculate which of the 6 gears the bike is in. It’s not terribly useful on a bicycle but I think it will be handy on the motorcycle.
On the motorcycle I’ll be intercepting pulses to the tachometer to get the engine RPM. For the bicycle I’ve got a magnet mounted on the pedal arm and a reed switch on the frame that trips every time the magnet comes by. On both the bicycle and the motorcycle the rear wheel speed is detected the same way with a reed switch and magnet. The reed switches are both cannibalized from failed cycle computers.
“Terribly useful” or not, I’ll take any excuse to ride around with a bike-mounted breadboard! Check out the Arduino code + info on Bill’s site. Combining this with a few other onboard sensors could make for an info-tastic handlebar display – and course you could always add some LED matrix turn signals to fully deck out your ride. Just be sure to use some weather resistant enclosures.