Go Down

Topic: Anemometer Pulse, Help! (Read 638 times) previous topic - next topic


Hi, I am new here, I just get some problem with my anemometer pulse output which type is QS-FS02, so I just have the code, but I didn't know why Ardunio Mega 2560 can't read the pulse.
there are 3 cable: brown to 5v, black to gnd, blue to pin5.
please Help, there is something wrong in my code?
#include <FreqCounter.h>

float frq;
int freq1;
int pinLed=13;

void setup() {
  pinMode(pinLed, OUTPUT);

  Serial.begin(9600);        // connect to the serial port

  Serial.println("Frequency Counter");


void loop() {

  // wait if any serial is going on
  FreqCounter::f_comp=10;   // Cal Value / Calibrate with professional Freq Counter
  FreqCounter::start(1000);  // 1000 ms Gate Time

  while (FreqCounter::f_ready == 0)

  Serial.print("  Freq: ");
  if(freq1<=0.944195) freq1=0; 

  digitalWrite(pinLed,!digitalRead(pinLed));  // blink Led



Use code tags, not quote tags, when posting code.

Nowhere does your code read pin 5.

Where did you find the library "FreqCounter" and what is it supposed to do?


Sorry, I am new here
I didn't know what suppose to do in FreqCounter.h because I just have it from my friend


May 21, 2018, 11:27 am Last Edit: May 21, 2018, 11:30 am by outsider
Appears the power supply is 5, 7, or 12 to 24 volts, that link shows several different output types, voltage, current, RS485, modbus, which ONE do you have? is there a part number in addition to QS-FS02?

Go Up