|
12345678910111213141516171819 |
- /* 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);
- }
- }
-
|