Pages: [1]   Go Down
Author Topic: working of pulsein function.......?????  (Read 342 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi all,
       can anyone tell me about pulsein function how it work???. i read about this function but have some confusion about this.
http://arduino.cc/en/Reference/PulseIn

problem is i can't understand when we called pulsein() function so which values it read and what is the mean of pulse length which it read(Read by pulsein function).


i want make a pules counter. which count the pules from input pin.
Logged

Offline Offline
Edison Member
*
Karma: 17
Posts: 1041
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

pulseIn counts the length of a pulse. So if you hooked up a switch and used pulseIn on the pin, then you pressed the switch down for 283 milliseconds, that would be its return value.

Counting pulses is a completely different thing.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 240
Posts: 24424
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So if you hooked up a switch and used pulseIn on the pin, then you pressed the switch down for 283 milliseconds, that would be its return value.
...but expressed in microseconds.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Pages: [1]   Go Up
Jump to: