Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void loop() {
- digitalWrite(triggerpin, HIGH); //Setting the triggerpin high for 10us to
- // generate a wave
- delayMicroseconds(10);
- digitalWrite(triggerpin, LOW);
- //At this point the ultrasonic bursts would have been generated and the echo
- //pin would have been set to high according to the
- // ultrasonic sensor datasheet. If so then why is the below pulseIn() function
- //working.
- time = pulseIn(echopin, HIGH);
- //some more code
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement