Arduino Playground is read-only starting December 31st, 2018. For more info please look at this Forum Post Arduino library to use timer 2 with a configurable resolution. Based on MsTimer2 by Javier Valencia. It's called FlexiTimer2 because it's based on MsTimer2, but offers more flexibility, since it has a configurable timer resolution. It works on: ATmega1280 (thanks to Manuel Negri). ATmega328 (