Add new file

This commit is contained in:
Cédric Abonnel 2022-05-15 17:38:28 +00:00
parent b5eb68547b
commit ec33927fc9
1 changed files with 16 additions and 0 deletions

View File

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