X-Git-Url: http://challenge-bot.com/repos/?p=challenge-bot;a=blobdiff_plain;f=build-stages%2Fc_both_sonars%2Fc_both_sonars.ino;h=ed81af469543efcbd9066fd6958f2e95e0037731;hp=931e1b16f0310c8e30ef9a311e91eed5749d0697;hb=133346797dd39ae3da1ae2c35d7c05e4ea5994cb;hpb=f747b5748a03b4c0fd6386b8e17aebd2d18d4b9e diff --git a/build-stages/c_both_sonars/c_both_sonars.ino b/build-stages/c_both_sonars/c_both_sonars.ino index 931e1b1..ed81af4 100644 --- a/build-stages/c_both_sonars/c_both_sonars.ino +++ b/build-stages/c_both_sonars/c_both_sonars.ino @@ -44,11 +44,9 @@ int ping(int trigger, int echo){ delay(50); return ping_time;} -double ping_to_cm(int ping_microseconds) -{ +double ping_to_cm(int ping_microseconds){ double sound_cm_per_microsecond_at_sea_level = 0.034029; - return ping_microseconds * sound_cm_per_microsecond_at_sea_level / 2; -} + return ping_microseconds * sound_cm_per_microsecond_at_sea_level / 2;} void setup(){ Serial.begin(9600);