upm  0.5.1
Sensor/Actuator repository for libmraa (v0.9.1)
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
Public Member Functions
BISS0001 Class Reference

API for the BISS0001 Motion Sensor. More...

Detailed Description

UPM module for the BISS0001 Motion Sensor

biss0001.jpg
// Instantiate a Grove Motion sensor on GPIO pin D2
upm::BISS0001* motion = new upm::BISS0001(2);
while (shouldRun)
{
bool val = motion->value();
if (val)
cout << "Detecting moving object";
else
cout << "No moving objects detected";
cout << endl;
sleep(1);
}

Public Member Functions

 BISS0001 (int pin)
 
 ~BISS0001 ()
 
bool value ()
 

Constructor & Destructor Documentation

BISS0001 ( int  pin)

BISS0001 motion sensor constructor

Parameters
pinDigital pin to use
~BISS0001 ( )

BISS0001 destructor

Member Function Documentation

bool value ( )

Gets the motion value from the sensor

Returns
Motion reading

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