Smartage application
Dependencies: BufferedSerial SX1276GenericLib USBDeviceHT mbed Crypto X_NUCLEO_IKS01A2
Fork of STM32L0_LoRa by
Diff: hcsr04.h
- Revision:
- 29:04e1489f8fe2
diff -r 9d7be893610d -r 04e1489f8fe2 hcsr04.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hcsr04.h Mon Sep 17 20:37:51 2018 +0000 @@ -0,0 +1,20 @@ +#ifndef hcsr04_H +#define hcsr04_H +#include "mbed.h" + + + +class HCSR04 { + public: + HCSR04(PinName t, PinName e); + long echo_duration(); + long distance(); + + private: + DigitalOut trig; + DigitalIn echo; + Timer timer; + long duration,distance_cm; +}; + +#endif \ No newline at end of file