In a simple sketch, write "Yo stupid!" to the LCD. Does that appear on the LCD? If not, you have one problem. If it does, you have a different problem. It would be nice to know which problem you are having.
The LCD is doing fine, it can show what i typed
but it cannot show the frequency that i am trying to find
What is this for? You don't use val anywhere
umm, if i would like to use the ADC, what the code is exactly
Looks to me like you are trying to re-invent the pulseIn function. Why not just use pulseIn? We know that function works.
If using the pulseIn function, could it be like this ?
if (pulseIn(1, HIGH)); {
// wait until pin goes high
while (digitalRead(frqPin) == 0) {}
// get the time when input goes high
timeStart = micros();
// wait until input goes low again
while (pulseIn(1, LOW) ){
}
// wait until input goes high again
while (digitalRead(frqPin) == 0) {
}
// take the actual time in microseconds
timeStop = micros();
// the timedifference is the the time between two rising
// edges of the input pin (= 1 period)
timeStart = timeStop-timeStart;
// normally the result is > 0, otherwise the
// function micros() had an overflow (every 70 min)
// the discard this measuring (or correct the value)
if (timeStart > 0) {
// calculate frequency
// 1000000 microseconds/second, f = 1/t
double f = 1000000.0/timeStart;
// report the measured frequency
lcd.println(f);
delay(1000);
lcd.clear();
}
}