Skip to main content

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​
Declaration
public interface IC4001 : ISensor

Methods​

SetSensorMode(SensorMode)​

Sets the sensor's operating mode (e.g., normal, low-power, or test mode).

View Source​
Declaration
bool SetSensorMode(C4001.SensorMode mode)
Returns​

System.Boolean: true if the mode was successfully set; otherwise, false.

Parameters​
TypeNameDescription
Meadow.Foundation.Sensors.Motion.C4001.SensorModemodeThe Meadow.Foundation.Sensors.Motion.C4001.SensorMode to apply to the sensor.

GetStatus()​

Retrieves the current status of the sensor.

View Source​
Declaration
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​
Declaration
byte GetTargetNumber()
Returns​

System.Byte: A byte representing the target number.

GetTargetSpeed()​

Gets the speed of the detected target.

View Source​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
void SetDetectionRange(ushort min, ushort max, ushort trig)
Parameters​
TypeName
System.UInt16min
System.UInt16max
System.UInt16trig

SetTrigSensitivity(byte)​

Sets the trigger sensitivity for the sensor.

View Source​
Declaration
void SetTrigSensitivity(byte sensitivity)
Parameters​
TypeName
System.Bytesensitivity

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​
Declaration
void SetKeepSensitivity(byte sensitivity)
Parameters​
TypeName
System.Bytesensitivity

IsMotionDetected()​

Indicates whether motion is currently detected by the sensor.

View Source​
Declaration
bool IsMotionDetected()
Returns​

System.Boolean: true if motion is detected; otherwise, false.