Library to use the ultrasonic sensor
Dependents: test_ultrasonic AEB Car_Simulator
Diff: Ultrasonic.h
- Revision:
- 0:72ec72845f71
- Child:
- 1:b3518845e71a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Ultrasonic.h Thu Jun 02 19:56:38 2016 +0000 @@ -0,0 +1,15 @@ +#ifndef ULTRASONIC_H +#define ULTRASONIC_H + +#include "mbed.h" + +#define TRIGGER D2 // The trigger pin +#define ECHO D4 // The echo pin + +void start(); +void stop(); +void trig(); +float read_cm(); +void Ultrasonic_init(); + +#endif