Infrared/laser sample frequency/period - rpm counter

so the maximum reading rate is about 10,000 times a second.

analogWrite() - Arduino Reference