diff --git a/School/vg1/Dataelektronikk/Ultrasonic Distance.ino b/School/vg1/Dataelektronikk/Ultrasonic Distance.ino index c6d603d..86f6b75 100644 --- a/School/vg1/Dataelektronikk/Ultrasonic Distance.ino +++ b/School/vg1/Dataelektronikk/Ultrasonic Distance.ino @@ -32,7 +32,7 @@ char cm[3]; void loop() { lcd.setCursor(0,1); - sprintf(cm, "%.3i", sonar.ping_cm()); + sprintf(cm, "%.3i", sonar.convert_cm(sonar.ping_median(5))); lcd.print(cm); delay(50); }