Hello, I´ve been working on a speed radar using a hb100 sensor. I have finished building it and everything seems fine but, when I upload the code no data the sensor receives appears on my LCD screen. I suspect there is something wrong with the code.
include <FreqMeasure.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(5, 4, 3, 2, 1, 0);
void setup() {
Serial.begin(57600);
lcd.begin(8, 2);
lcd.print("Freq:");
FreqMeasure.begin();
}
double sum=0;
int count=0;
void loop() {
if (FreqMeasure.available()) {
// average several reading together
sum = sum + FreqMeasure.read();
count = count + 1;
if (count > 30) {
float frequency = FreqMeasure.countToFrequency(sum / count);
lcd.setCursor(0, 1);
lcd.print(frequency);
lcd.print(" ");
sum = 0;
count = 0;
}
}
}
This is where I found the code and its libraries:
https://github.com/3zuli/HB100_test
I don´t know if it is the libraries or the code. Can someone help?