We have the code so that when the Arduino detects a value of 1 on digitalpin2, millis() begins.
When the Arduino detects a value of 0 on digitalpin2, we want it to divide 1/(difference in time) to calculate the frequency.
We want this loop to be continuous and have the millis counter reset after after calculation. can anyone help us please?
If the pin is high, start a timer