Files
arduino-libs/arduino-cli/libraries/FreqCount/examples/Serial_Output/Serial_Output.pde
2024-07-20 22:09:06 +08:00

20 lines
361 B
Plaintext

/* FreqCount - Example with serial output
* http://www.pjrc.com/teensy/td_libs_FreqCount.html
*
* This example code is in the public domain.
*/
#include <FreqCount.h>
void setup() {
Serial.begin(57600);
FreqCount.begin(1000);
}
void loop() {
if (FreqCount.available()) {
unsigned long count = FreqCount.read();
Serial.println(count);
}
}