Help Needed for installing an Arduino library file - FreqPeriod. h

Status
Not open for further replies.

Pavi98

Member
Hello all,
I need an Arduino library file named as "FreqPeriod. h" but I couldn't find a zip file of that library on the Internet. Instead of a zip file I could find a code on github but I don't know how to use it on my program. Please help me to solve this problem?

Thank you.
 
Go back a page or two on github, and you get an option to download the zip file.
Hello Nigel,
Thank you very much for the reply. I tried as you said but I couldn't find a option to download it as a zip file. I will add the link of the github below.


Can I manually add the library as there is no option to download the file?

Thank you.
 
Also i think it will work if you copy text, paste it to notepad and then save it with .h .cpp and .txt at the end.
Try it
 

I added the library file but the program doesn't compile and it shows an error in the .cpp file of the library. I'll paste the error message below.

C:\Users\user\Documents\Arduino\libraries\FreqPeriod\FreqPeriod.cpp:114:4: error: expected constructor, destructor, or type conversion before '(' token

ISR(TIMER1_OVF_vect ) {

^

C:\Users\user\Documents\Arduino\libraries\FreqPeriod\FreqPeriod.cpp:119:4: error: expected constructor, destructor, or type conversion before '(' token

ISR(ANALOG_COMP_vect ) {

^

Error compiling for board Teensy 3.2 / 3.1.



Could you please help me to solve this problem?

Thank you.
 
Did you paste also .cpp file? I think it needs to create object but it doest find constructor function.
Yes I pasted the . cpp file also. Actually I'm a newbie in coding and I can't understand how to solve this problem. Could please you guide me to fix this error and compile this program properly?

Thank you very much.
 

I'm trying to build a vehicle speed detector using a HB100 radar sensor. Can I use the FreqMeasure library for that and how can I modify the following example code of the FreqMeasure library for that purpose?

#include <FreqMeasure.h>

void setup() {
Serial.begin(9600);
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);
Serial.println(frequency);
sum = 0;
count = 0;
}
}
}

Thank you very much.
 
It says on t'web site.. FreqCount would be better as it counts up to 8Mhz.. freqmeasure is a little light, only up to 1Khz..

Are you measuring the gearbox sensor output?
 
It says on t'web site.. FreqCount would be better as it counts up to 8Mhz.. freqmeasure is a little light, only up to 1Khz..

Are you measuring the gearbox sensor output?

I'm trying to build a circuit that can be used to measure the speed of vehicles on the road. The sensor that I'm going to use is HB100 radar sensor and the datasheet shows that it has X-Band frequency: 10.525 GHz. I'm quite not sure how to build a source code for this sensor and what library I should use for this.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…