Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: 2ndYearProject-DistanceSensor
Fork of SRF02 by
Revision 1:8e6587d88773, committed 2015-03-08
- Comitter:
- eencae
- Date:
- Sun Mar 08 14:21:40 2015 +0000
- Parent:
- 0:b729d2ce03bd
- Child:
- 2:45d62ec49ee9
- Commit message:
- Updated docs
Changed in this revision
| SRF02.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/SRF02.h Sun Mar 08 14:15:29 2015 +0000
+++ b/SRF02.h Sun Mar 08 14:21:40 2015 +0000
@@ -58,10 +58,24 @@
{
public:
+ /** Create a SRF02 object connected to the specified I2C pins
+ *
+ * @param sdaPin - mbed SDA pin
+ * @param sclPin - mbed SCL pin
+ *
+ */
SRF02(PinName sdaPin, PinName sclPin);
+ /** Read distance in centimetres
+ *
+ * @returns distance in centimetres (int)
+ *
+ */
int getDistanceCm();
private:
+ /** Hangs in infinite loop flashing 'blue lights of death'
+ *
+ */
void error();
