SRF08 Libraray

Dependents:   mbedDemoDisplay mbedDemoDisplay Roaming SRF08HelloWorld ... more

Embed: (wiki syntax)

« Back to documentation index

SRF08 Class Reference

SRF08 Class Reference

Library for the SRF08 Ultrasonic Ranger. More...

#include <SRF08.h>

Public Member Functions

 SRF08 (PinName sda, PinName scl, int addr)
 Creates an instance of the class.
 ~SRF08 ()
float read ()
 Reads the current temperature.

Detailed Description

Library for the SRF08 Ultrasonic Ranger.

The SRF08 is an Ultrasonic range finder, with an I2C interface that allows the measurement to be read directly in centimetres

Definition at line 33 of file SRF08.h.

Constructor & Destructor Documentation

SRF08 ( PinName  sda,
PinName  scl,
int  addr 

Creates an instance of the class.

Connect module at I2C address addr using I2C port pins sda and scl. SRF08

Definition at line 27 of file SRF08.cpp.

~SRF08 (  )

Destroys instance.

Definition at line 40 of file SRF08.cpp.

Member Function Documentation

float read (  )

Reads the current temperature.

Reads the temperature register of the TMP102 and converts it to a useable value.

Definition at line 44 of file SRF08.cpp.