public class GpioMotionSensorComponent extends MotionSensorBase
lastInactivityTimestamp, lastMotionTimestamp
listeners
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, removeListener
addListener, removeAllListeners, removeListener
clearProperties, getName, getProperties, getProperty, getProperty, getTag, hasProperty, removeProperty, setName, setProperty, setTag
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
removeAllListeners
clearProperties, getName, getProperties, getProperty, getProperty, getTag, hasProperty, removeProperty, setName, setProperty, setTag
public 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 MotionSensor
isMotionDetected
in class MotionSensorBase
Copyright © 2012–2014 Pi4J. All rights reserved.