Using an SR04

Dependencies:   mbed

Committer:
faif
Date:
Sun Dec 18 00:31:29 2016 +0000
Revision:
0:6f74064686e4
First version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
faif 0:6f74064686e4 1 #ifndef ULTRASONIC_FINDER_H
faif 0:6f74064686e4 2 #define ULTRASONIC_FINDER_H
faif 0:6f74064686e4 3
faif 0:6f74064686e4 4 DigitalIn echo(p20);
faif 0:6f74064686e4 5 DigitalOut trigger(p19);
faif 0:6f74064686e4 6 Serial pc(USBTX, USBRX);
faif 0:6f74064686e4 7
faif 0:6f74064686e4 8 void clear_screen();
faif 0:6f74064686e4 9 void send_pulse(DigitalOut& triggerOut);
faif 0:6f74064686e4 10 float measure_pulse(Timer& timer, const DigitalIn& echoIn);
faif 0:6f74064686e4 11 void show_result(float pulse);
faif 0:6f74064686e4 12
faif 0:6f74064686e4 13 #endif