The following link to the library defines arduino pin 5 for input pin for signal.
https://www.pjrc.com/teensy/td_libs_FreqCount.html
But the problem is I'm using an 16x2 LCD display with the arduino pin 5. The display needs pin 5 to work. So the question can solved in two ways,to both of which I don't know the answer.
1. Change LCD pin number to other pin. (Tried it was a failure. I've probably done it wrong)
2. Change the input pin for the freqcount library.
Any idea how to get past this bottleneck?
1 Answer 1
The library makes use of the hardware peripheral Timer 1 which has its input on pin 5 of the Uno.
It can't be changed. You have no choice in that.
You will have to move the LCD to another pin instead.
-
any idea how to do that?Parth Sane– Parth Sane2015年01月09日 03:41:24 +00:00Commented Jan 9, 2015 at 3:41
-
Like you tried before, but don't use pins 0 or 1 - they are shared with Serial and sometimes that gets in the way - especially if you're also using Serial for communication with a PC at the same time.Majenko– Majenko2015年01月09日 10:12:14 +00:00Commented Jan 9, 2015 at 10:12
LiquidCrystal lcd(12, 11, 4,3 , 2, 1);
in place ofLiquidCrystal lcd(12, 11, 5,4 , 3, 2);
This fails for some reason. Nothing appears on the screen.