Hi guys,
I have a little problem with the function pulseIn().
On the
pulseIn() page in the Arduino language's documentation we can see that pulseIn() has two constructor: pulseIn(pin, value) and pulseIn(pin, value, timeout), where timeout is, in fact, an optional parameter.
so, when I do (for example):
Code:
... (some definitions)
#define echoPin 6
long duration;
setup()
{
...
pinMode(echoPin, INPUT);
...
}
loop()
{
...
duration = pulseIn(echoPin, HIGH);
...
}
It will not work; I must write : duration = pulseIn(echoPin, HIGH, 1000)
I know, it's no big deal, but I just wanted to note that. ^^
Sorry if this thread is in the wrong section.
Flaco