Vejam ai essa merda

Dependencies:   HC_SR04_Ultrasonic_Library mbed

sonar.cpp

Committer:
Edgar2016
Date:
2016-09-21
Revision:
0:498cbd4c79e9

File content as of revision 0:498cbd4c79e9:

#include "sonar.h"
#include "mbed.h"
#include "ultrasonic.h"

Sonar::Sonar():
_ultrasonic(Sonar::trigger, Sonar::echo, Sonar::updateTime, Sonar::timeout)
{ 

   
}
float Sonar::lerDistancia(ultrasonic _ultrasonic){
    
    float distancia = _ultrasonic.getCurrentDistance();
    return distancia;
    
}