Frequency period measurement library based loosely on the one for AVR based Arduinos.