BayEOS-Arduino  1.8.0_0.0.4
Public Member Functions | Public Attributes | List of all members
SRF02 Class Reference

Public Member Functions

 SRF02 (int deviceId, int mode)
 SRF02 ()
int getDistance ()

Public Attributes

int _deviceId
int _mode

Detailed Description

Definition at line 14 of file SRF02.h.

Constructor & Destructor Documentation

◆ SRF02() [1/2]

SRF02::SRF02 ( int  deviceId,
int  mode 

Initialize SRF02.

deviceIdThe I2C device id
modeWether sensor values are read as inches, centimeters or miliseconds

Definition at line 8 of file SRF02.cpp.

◆ SRF02() [2/2]

SRF02::SRF02 ( )
  • Initialize SRF02 with default values

Definition at line 15 of file SRF02.cpp.

Member Function Documentation

◆ getDistance()

int SRF02::getDistance ( )

Get the sensor distance value.

The distance value

Definition at line 21 of file SRF02.cpp.

Member Data Documentation

◆ _deviceId

int SRF02::_deviceId

I2C device id

Definition at line 42 of file SRF02.h.

◆ _mode

int SRF02::_mode

Measurement mode

Definition at line 44 of file SRF02.h.

The documentation for this class was generated from the following files: