Interface IC4001
Represents a C4001 motion sensor, providing access to motion data such as status, target properties, and motion detection state.
Assembly: C4001.dll
View Source
public interface IC4001 : ISensor
Methods
SetSensorMode(SensorMode)
Sets the sensor's operating mode (e.g., normal, low-power, or test mode).
View Source
bool SetSensorMode(C4001.SensorMode mode)
Returns
System.Boolean: true if the mode was successfully set; otherwise, false.
Parameters
| Type | Name | Description |
|---|---|---|
| Meadow.Foundation.Sensors.Motion.C4001.SensorMode | mode | The Meadow.Foundation.Sensors.Motion.C4001.SensorMode to apply to the sensor. |
GetStatus()
Retrieves the current status of the sensor.
View Source
C4001.SensorStatus GetStatus()
Returns
Meadow.Foundation.Sensors.Motion.C4001.SensorStatus: The current Meadow.Foundation.Sensors.Motion.C4001.SensorStatus indicating sensor readiness or errors.
GetTargetNumber()
Retrieves the ID or number of the current detected target.
View Source
byte GetTargetNumber()
Returns
System.Byte: A byte representing the target number.
GetTargetSpeed()
Gets the speed of the detected target.
View Source
Speed GetTargetSpeed()
Returns
Meadow.Units.Speed: A Meadow.Units.Speed value representing the target's speed in meters per second.
GetTargetRange()
Gets the range (distance) to the detected target.
View Source
Length GetTargetRange()
Returns
Meadow.Units.Length: A Meadow.Units.Length value representing the target's range in meters.
GetTargetEnergy()
Gets the energy level or strength of the detected target signal.
View Source
uint GetTargetEnergy()
Returns
System.UInt32: An unsigned integer representing the target's energy level.
SetDetectionRange(ushort, ushort, ushort)
Sets the detection range for the sensor.
View Source
void SetDetectionRange(ushort min, ushort max, ushort trig)
Parameters
| Type | Name |
|---|---|
System.UInt16 | min |
System.UInt16 | max |
System.UInt16 | trig |
SetTrigSensitivity(byte)
Sets the trigger sensitivity for the sensor.
View Source
void SetTrigSensitivity(byte sensitivity)
Parameters
| Type | Name |
|---|---|
System.Byte | sensitivity |
SetKeepSensitivity(byte)
Sets the keep sensitivity for the sensor, which determines the sensor's ability to maintain detection of a target once triggered.
View Source
void SetKeepSensitivity(byte sensitivity)
Parameters
| Type | Name |
|---|---|
System.Byte | sensitivity |
IsMotionDetected()
Indicates whether motion is currently detected by the sensor.
View Source
bool IsMotionDetected()
Returns
System.Boolean: true if motion is detected; otherwise, false.