'

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers hcsr04.h Source File

hcsr04.h

00001 #ifndef hcsr04_H
00002 #define hcsr04_H
00003 #include "mbed.h"
00004  
00005 class HCSR04 {
00006   public:
00007     HCSR04(PinName t, PinName e);
00008     long echo_trajanjeImpulsa();
00009     long udaljenost();
00010  
00011     private:
00012         DigitalOut triger;
00013         DigitalIn echo;
00014         Timer timer;
00015         long trajanjeImpulsa,udaljenost_cm;
00016 };
00017  
00018 #endif