Class Hcsr501
PIR Sensor HC-SR501
[Interface("PIR Sensor HC-SR501")]
public class Hcsr501
- Inheritance
-
Hcsr501
Constructors
Hcsr501(int, PinNumberingScheme, GpioController?, bool)
Creates a new instance of the HC-SCR501.
public Hcsr501(int outPin, PinNumberingScheme pinNumberingScheme = PinNumberingScheme.Logical, GpioController? gpioController = null, bool shouldDispose = true)
Parameters
outPin
intOUT Pin
pinNumberingScheme
PinNumberingSchemePin Numbering Scheme
gpioController
GpioControllerGpioController related with operations on pins
shouldDispose
boolTrue to dispose the Gpio Controller
Properties
IsMotionDetected
If a motion is detected, return true.
[Telemetry]
public bool IsMotionDetected { get; }
Property Value
Methods
Dispose()
Cleanup
public void Dispose()
Events
Hcsr501ValueChanged
Triggering when HC-SR501 value changes
public event Hcsr501.Hcsr501ValueChangedHandle? Hcsr501ValueChanged