4ピン用ピング
Dependents: CatPot_SensorRight CatPotI2CSlavetest CatPotI2CSlavetest CatPot_SensorRight_F ... more
Fork of Ping by
Diff: Ping.h
- Revision:
- 2:6be59631152a
- Parent:
- 1:6996f66161d7
diff -r 6996f66161d7 -r 6be59631152a Ping.h --- a/Ping.h Sat Mar 12 22:32:06 2011 +0000 +++ b/Ping.h Sat Dec 06 07:40:50 2014 +0000 @@ -53,7 +53,7 @@ * * @param PING_PIN InterruptIn pin to connect to */ - Ping(PinName PING_PIN); + Ping(PinName Trig_PIN,PinName Echo_PIN); /** Sends a Ping * @@ -76,7 +76,8 @@ protected: InterruptIn _event; - DigitalInOut _cmd; + DigitalOut _trig; + DigitalIn _echo; Timer _timer; bool _Valid;