Modifying the pins that FreqMeasure library uses

Status
Not open for further replies.

1tal

New member
Hi,

I am using the FreqMeasure library with Arduino UNO for an automatic guitar tuner and it works great! thank you so much, somehow i couldn't get FreqPeriod work, and i wasted lots of days, but FreqMesure was my savior :)

my question as it is in thread title: is it possible to modify the pins that the library uses? because i would like to use a TFT LCD as user interface, and it's some kind of cheap chinese product, and it only works with digital pins 8 and 9, which FreqMeasure already uses... :S so i was wondering if i could switch the pins from 8 (9 and 10?) to some other three digital pins? if it could work, how should i modify the code?
I'm sorry if the answers would be evident, but i'm just a beginner, so i thought it would be faster if i asked :)
 
Pin 8 is the ICP1 (Input Capture Pin 1). As there is only one of these you can not switch the pin

Unfortunately this is also the RX pin which is probably needed for your TFT LCD.

Can you post the part number of your LCD? You maybe able to drive it with just the TX pin (Pin 9)
 
Thanks for your reply, but since then I solved my problem by using the same LCD with an Arduino MEGA, so the pins required by FreqMeasure are free this way :)
 
If you ever decide to make a more advanced version, check out the Teensy audio library notefreq analysis. It uses the YIN algorithm, which is much better than turning the signal into digital pulses for FreqMeasure. Even when there's strong harmonics which cause the digital signal to become a harmonic of the note, the YIN algorithm can find the note's fundamental.

http://www.pjrc.com/teensy/gui/?info=AudioAnalyzeNoteFrequency
 
Status
Not open for further replies.
Back
Top