Skip to main content

Class C4001

Create a new C4001 object

Assembly: C4001.dll​
View Source​
Declaration
public class C4001 : IC4001, ISensor, II2cPeripheral

Implements:
Meadow.Foundation.Sensors.Motion.IC4001, Meadow.Peripherals.Sensors.ISensor, Meadow.Hardware.II2cPeripheral

Properties​

DefaultI2cAddress​

The default I2C address for the peripheral

View Source​
Declaration
public byte DefaultI2cAddress { get; }

Methods​

SetSensorMode(SensorMode)​

Set the Sensor sampling mode

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

System.Boolean

Parameters​
TypeName
Meadow.Foundation.Sensors.Motion.C4001.SensorModemode

GetStatus()​

Get the current status of the sensor

View Source​
Declaration
public C4001.SensorStatus GetStatus()
Returns​

Meadow.Foundation.Sensors.Motion.C4001.SensorStatus: The current status of the sensor.

GetTargetNumber()​

Get the target number

View Source​
Declaration
public byte GetTargetNumber()
Returns​

System.Byte

GetTargetSpeed()​

Gets the target speed from the sensor's buffer.

View Source​
Declaration
public Speed GetTargetSpeed()
Returns​

Meadow.Units.Speed: The target speed as a float.

GetTargetRange()​

Gets the target range from the sensor's buffer.

View Source​
Declaration
public Length GetTargetRange()
Returns​

Meadow.Units.Length: The target range as a float.

GetTargetEnergy()​

Gets the target energy from the sensor's buffer.

View Source​
Declaration
public uint GetTargetEnergy()
Returns​

System.UInt32: The target energy as an unsigned integer.

IsMotionDetected()​

Determines if motion is currently detected by the sensor.

View Source​
Declaration
public bool IsMotionDetected()
Returns​

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

SetDetectionRange(ushort, ushort, ushort)​

Sets the detection range for the sensor.

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

GetTargetEnergyI2c()​

View Source​
Declaration
public uint GetTargetEnergyI2c()
Returns​

System.UInt32

Implements​