Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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
 

The green box that says 'code' - click on it and select download zip

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.
 
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.
 
you'll need to find the library to suit the teensy 3.1 This is a 32bit processor so the basic 8 bit library will not be supported.

You need FreqMeasure Library, for Measuring Frequencies in the 0.1 to 1000 Hz range, or RPM Tachometer Applications (pjrc.com)

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?

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.

Latest threads

Back
Top