Arduino > WheelWatcher
http://www.nubotics.com/products/ww12/index.html
#include <msg.h> byte count; byte data[2]; void message() { } void setup() { msg.setup(message,"Wheel Watcher"); // Setup msg msg.detach(2); msg.detach(3); // Interrupt 0 is linked to pin 2 attachInterrupt(0, blip, CHANGE); } void loop() { msg.loop(); // Update msg if ( count > 0 ) { data[0] = digitalRead(3); data[1] = count; msg.writeBytes(data,2); count = 0; } } void blip() { count++; }