SRF02 Ultrasonic Ranger
Revision 1:f914b5b8c84e, committed 2021-06-22
- Comitter:
- ColineC
- Date:
- Tue Jun 22 13:21:57 2021 +0000
- Parent:
- 0:adf5a063372d
- Commit message:
- librairie capteur
Changed in this revision
SRF02.cpp | Show annotated file Show diff for this revision Revisions of this file |
SRF02.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r adf5a063372d -r f914b5b8c84e SRF02.cpp --- a/SRF02.cpp Thu Jul 31 13:52:49 2014 +0000 +++ b/SRF02.cpp Tue Jun 22 13:21:57 2021 +0000 @@ -9,7 +9,7 @@ { char w[2]= {COMMAND_REGISTER,command}; if (i2c_bus.write(deviceAddess,w ,2)>=0) - wait(DefaultWait); + HAL_Delay(0.07); else return -1; char r[1] = {mode}; if (i2c_bus.write(deviceAddess,r ,1)>=0)
diff -r adf5a063372d -r f914b5b8c84e SRF02.h --- a/SRF02.h Thu Jul 31 13:52:49 2014 +0000 +++ b/SRF02.h Tue Jun 22 13:21:57 2021 +0000 @@ -19,7 +19,7 @@ static const uint8_t REAL_RANGING_CENTIMETERS = 0x51; static const uint8_t REAL_RANGING_SECONDS = 0x52; - static const float DefaultWait = 0.07; + //static const float DefaultWait = 0.07; I2C i2c_bus;