初始化提交
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/* 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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user