Estou tentando testas um sensor ultrassônico, mas ao abrir o monitor serial aparece somente a tabela ASCII, abaixo o código utilizado!
#include <NewPing.h>
#define TRIGGER_PIN 4
#define ECHO_PIN 5
#define MAX_DISTANCE 30
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
delay(50);
Serial.print("Ping: ");
Serial.print(sonar.ping_cm());
Serial.println("cm");
}