Created libraries2
Dependencies: mbed ultrasonic
Diff: main.cpp
- Revision:
- 11:711c539b95b8
- Parent:
- 9:74d372e08f41
- Child:
- 12:086122072266
diff -r 74d372e08f41 -r 711c539b95b8 main.cpp --- a/main.cpp Fri Apr 17 16:01:09 2015 +0000 +++ b/main.cpp Tue Apr 21 06:40:31 2015 +0000 @@ -17,7 +17,7 @@ HVoff = 1; TX1.period(0.0000252); // Set the period of TX1 to 25.2us (39,682kHz) TX1.pulsewidth(0.0000116); // Set the pulsewidth of TX1 to 11.6us (ON) - wait(0.000300); // Waits 201.6us + wait(0.000300); // Waits 201.6us TX1 = 1; t1.reset(); HVoff = 0; @@ -27,7 +27,7 @@ void signal_reciev(){ float _time = t1.read(); - if (_time<0.006 && _time>0.000036){ + if (_time<0.006 && _time>0.0001){ // Reads only between 100cm and 1,7cm if (t1.read()>previous){ pc.printf("check");