/* Project: default */
#include <NewPing.h>
#define TRIGGER_PIN 25
#define ECHO_PIN 33
#define MAX_DISTANCE 150
#define SOUND_SPEED 0.171
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);
unsigned long Frecuencia_ = 0;
void setup()
{
Serial.begin(115200);
}
void loop()
{
if(millis() - Frecuencia_ > 500){
Frecuencia_ = millis();
Serial.println(sonar.ping_cm());}
}