Update sketchdistanceSerial.ino

This commit is contained in:
Cédric Abonnel 2022-05-15 17:48:11 +00:00
parent 28c1814f8e
commit 8012e907b1
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
#include "Ultrasonic.h"
Ultrasonic ultrasonic(8,9); // Trig et Echo
Ultrasonic capteur(8,9); // Trig et Echo
void setup() {
Serial.begin(9600);
@ -8,9 +8,9 @@ void setup() {
}
void loop () {
int dist = ultrasonic.Ranging(CM);
int dist = capteur.Ranging(CM);
Serial.print(dist);
Serial.println(" cm");
delay(100);
delay(100); // 100 ms
}