회로도전자부품

아두이노 주파수 측정

by 디케 posted Jan 06, 2014
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄

아두이노 주파수 측정

 

참고 : http://interface.khm.de/index.php/lab/experiments/arduino-frequency-counter-library/

 

Example Programm


#include <FreqCounter.h>

void setup() {
  Serial.begin(57600);                    // connect to the serial port
  Serial.println("Frequency Counter");
}

long int frq;
Void loop() {

 FreqCounter::f_comp= 8;             // Set compensation to 12
 FreqCounter::start(100);            // Start counting with gatetime of 100ms
 while (FreqCounter::f_ready == 0)         // wait until counter ready
 
 frq=FreqCounter::f_freq;            // read result
 Serial.println(frq);                // print result
 delay(20);
}


Preamplifier schematics


<br />

 

 


Articles