upm  0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
Public Member Functions | List of all members

API for the RFR359F-based Grove Distance Interrupter. More...

Detailed Description

UPM module for the Grove distance interrupter. The sensitivity can be adjusted with the potentiometer on the sensor module. It has a range of approximately 4 inches and a quick response time.

rfr359f.jpg
// Instantiate an RFR359F digital pin D2
upm_rfr359f.RFR359F dInterruptor = new upm_rfr359f.RFR359F(2);
while (true) {
if (dInterruptor.objectDetected()) {
System.out.println("Object detected");
} else {
System.out.println("Area is clear!");
}
Thread.sleep(100);
}

Public Member Functions

synchronized void delete ()
 
 RFR359F (int pin)
 
boolean objectDetected ()
 

Constructor & Destructor Documentation

RFR359F ( int  pin)

RFR359F constructor

Parameters
pinDigital pin to use

Member Function Documentation

boolean objectDetected ( )

Gets the status of the pin; true means an object has been detected

Returns
True if the sensor has detected an object

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