The echo pulse is HIGH when the echo is received, so pulseIn should measure HIGH pulse.
Step 2: Verify other code parts
delayMicroseconds(10) is correct for 10 microseconds pulse; triggerPin sequence is correct; echoTime type depends on usage but not an error here.
Final Answer:
pulseIn should measure HIGH pulse, not LOW -> Option C
Quick Check:
pulseIn measures HIGH pulse = D [OK]
Hint: pulseIn(echoPin, HIGH) to measure echo pulse [OK]
Common Mistakes:
Measuring LOW pulse instead of HIGH
Using delay() instead of delayMicroseconds()
Setting triggerPin LOW before HIGH incorrectly
5. You want to measure distance continuously and print it every second using HC-SR04. Which code snippet correctly triggers the sensor and calculates distance in cm?