Smartage application
Dependencies: BufferedSerial SX1276GenericLib USBDeviceHT mbed Crypto X_NUCLEO_IKS01A2
Fork of STM32L0_LoRa by
hcsr04.h
00001 #ifndef hcsr04_H 00002 #define hcsr04_H 00003 #include "mbed.h" 00004 00005 00006 00007 class HCSR04 { 00008 public: 00009 HCSR04(PinName t, PinName e); 00010 long echo_duration(); 00011 long distance(); 00012 00013 private: 00014 DigitalOut trig; 00015 DigitalIn echo; 00016 Timer timer; 00017 long duration,distance_cm; 00018 }; 00019 00020 #endif
Generated on Thu Jul 14 2022 21:27:01 by 1.7.2