All Questions
1 question
3
votes
1
answer
9k
views
How can I replace pulseIn with interrupts?
I have an HC-SR04 sensor and I need to get the distance from it. I use this code:
digitalWrite(trig, LOW);
delayMicroseconds(2);
digitalWrite(trig, HIGH);
delayMicroseconds(10);
digitalWrite(trig, ...