public class GpioMotionSensorComponent extends MotionSensorBase
lastInactivityTimestamp, lastMotionTimestamplisteners| Constructor and Description |
|---|
GpioMotionSensorComponent(GpioPinDigitalInput pin)
default constructor; using this constructor assumes that:
(1) a pin state of HIGH is MOTION DETECTED
|
GpioMotionSensorComponent(GpioPinDigitalInput pin,
PinState motionDetectedState)
using this constructor requires that the consumer
define the MOTION DETECTED pin state
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isMotionDetected()
Return 'true' if motion is currently detected
based on the GPIO digital input pin state.
|
addListener, getLastInactivityTimestamp, getLastMotionTimestamp, notifyListeners, removeListeneraddListener, removeAllListeners, removeListenerclearProperties, getName, getProperties, getProperty, getProperty, getTag, hasProperty, removeProperty, setName, setProperty, setTagclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitremoveAllListenersclearProperties, getName, getProperties, getProperty, getProperty, getTag, hasProperty, removeProperty, setName, setProperty, setTagpublic GpioMotionSensorComponent(GpioPinDigitalInput pin, PinState motionDetectedState)
pin - GPIO digital input pinmotionDetectedState - pin state to set when SENSOR DETECTS MOTIONpublic GpioMotionSensorComponent(GpioPinDigitalInput pin)
pin - GPIO digital input pinpublic boolean isMotionDetected()
isMotionDetected in interface MotionSensorisMotionDetected in class MotionSensorBaseCopyright © 2012-2013 Pi4J. All Rights Reserved.