#ifndef ULTRASONIC_H #define ULTRASONIC_H #include #include #define US_RX_0_PIN 2 #define US_RX_1_PIN 3 #define US_TX_0_PIN 4 struct usData_t { uint32_t pulseStart; long duration; bool rxPending; bool newData; }; void us_init(); void us_transmit(); long us_get_duration(byte sensor); #endif