void ISR_Rangefinder(void)
A class to manage the HC-SR04 ultrasonic rangefinder.
uint8_t checkPingTimer(void)
checkPingTimer() checks to see if it's time to send a new ping.
Rangefinder(uint8_t echo, uint8_t trig)
Constructor.
float getDistance(void)
Returns the last recorded distance in cm. The first call to getDistance() will return 99.
void ISR_echo(void)
ISR for the echo pin.
volatile uint32_t pulseEnd
volatile uint32_t pulseStart