Help with frequency counter on digital pin
hello brainrtrust,
my project consists of reading pot on analog pin , frequency on digital pin control 2 seperate digital pins either high or low.
my main problem understanding how compute digital pin freq , use plus pot turn 1 or both digital outputs on or off depending on frequency vs pot voltage.
my project consists of reading pot on analog pin , frequency on digital pin control 2 seperate digital pins either high or low.
my main problem understanding how compute digital pin freq , use plus pot turn 1 or both digital outputs on or off depending on frequency vs pot voltage.
connect digital input e.g. pin2, , let trigger interrupt stores time (microsecs)
someting tile this:
vasrables declared volatile;
last_time=this_time;
this_time=microse();
period=this_time-last_time;
// freq=1000000/period;
someting tile this:
vasrables declared volatile;
last_time=this_time;
this_time=microse();
period=this_time-last_time;
// freq=1000000/period;
Arduino Forum > Using Arduino > Programming Questions > Help with frequency counter on digital pin
arduino
Comments
Post a Comment