GRAY CODE - OPTICAL ENCODER CODE

Is there "ready to run" or a sample code for using optical encoder - Gray code using interrupt?
I am not fond of reinventing wheel if someone already done that.
Thanks Vaclav

It is such a small wheel it hardly needs any invention at all. A gray code just changes by one bit every increment.if it is only a two bit gray code then look at the rotory encoder examples.

http://forum.arduino.cc//index.php?topic=55478.0