that post has two separate methods , one measures the pulse width with timer counts the other by timer overflows