Exactly as suggested in Square wave generator and frequency meter - #3 by johnwasser but since the Mega pins are different compared to Uno, I change the Timer1 to Timer5. The reading is done in Mega pin D48 (icp5)
Exactly as suggested in Square wave generator and frequency meter - #3 by johnwasser but since the Mega pins are different compared to Uno, I change the Timer1 to Timer5. The reading is done in Mega pin D48 (icp5)