LD2410Async
Asynchronous Arduino ESP32 library for the LD2410 mmWave radar sensor
Loading...
Searching...
No Matches
LD2410Types Namespace Reference

All enums, structs, and type helpers for LD2410Async. More...

Classes

struct  ConfigData
 
struct  DetectionData
 Holds the most recent detection data reported by the radar. More...
 
struct  StaticData
 

Enumerations

enum class  TargetState {
  NO_TARGET = 0 , MOVING_TARGET = 1 , STATIONARY_TARGET = 2 , MOVING_AND_STATIONARY_TARGET = 3 ,
  AUTOCONFIG_IN_PROGRESS = 4 , AUTOCONFIG_SUCCESS = 5 , AUTOCONFIG_FAILED = 6
}
 Represents the current target detection state reported by the radar. More...
 
enum class  LightControl { NOT_SET = -1 , NO_LIGHT_CONTROL = 0 , LIGHT_BELOW_THRESHOLD = 1 , LIGHT_ABOVE_THRESHOLD = 2 }
 Light-dependent control status of the auxiliary output. More...
 
enum class  OutputControl { NOT_SET = -1 , DEFAULT_LOW_DETECTED_HIGH = 0 , DEFAULT_HIGH_DETECTED_LOW = 1 }
 Logic level behavior of the auxiliary output pin. More...
 
enum class  AutoConfigStatus { NOT_SET = -1 , NOT_IN_PROGRESS , IN_PROGRESS , COMPLETED }
 State of the automatic threshold configuration routine. More...
 
enum class  Baudrate {
  BAUDRATE_9600 = 1 , BAUDRATE_19200 = 2 , BAUDRATE_38400 = 3 , BAUDRATE_57600 = 4 ,
  BAUDRATE_115200 = 5 , BAUDRATE_230500 = 6 , BAUDRATE_256000 = 7 , BAUDRATE_460800 = 8
}
 
enum class  DistanceResolution { NOT_SET = -1 , RESOLUTION_75CM = 0 , RESOLUTION_20CM = 1 }
 Distance resolution per gate for detection. More...
 

Detailed Description

All enums, structs, and type helpers for LD2410Async.

Enumeration Type Documentation

◆ AutoConfigStatus

enum class LD2410Types::AutoConfigStatus
strong

State of the automatic threshold configuration routine.

Auto-config adjusts the sensitivity thresholds for optimal detection in the current environment. This process may take several seconds.

Use NOT_SET only as a placeholder; it is not a valid configuration value.

Enumerator
NOT_SET 

Status not yet retrieved.

NOT_IN_PROGRESS 

Auto-configuration not running.

IN_PROGRESS 

Auto-configuration is currently running.

COMPLETED 

Auto-configuration finished (success or failure).

Definition at line 160 of file LD2410Types.h.

◆ Baudrate

enum class LD2410Types::Baudrate
strong
@brief Supported baud rates for the sensor's UART interface.

These values correspond to the configuration commands accepted by the LD2410. After changing the baud rate, a sensor reboot is required, and the ESP32's UART must be reconfigured to match.

Enumerator
BAUDRATE_9600 

9600 baud.

BAUDRATE_19200 

19200 baud.

BAUDRATE_38400 

38400 baud.

BAUDRATE_57600 

57600 baud.

BAUDRATE_115200 

115200 baud.

BAUDRATE_230500 

230400 baud.

BAUDRATE_256000 

256000 baud (factory default).

BAUDRATE_460800 

460800 baud (high-speed).

Definition at line 195 of file LD2410Types.h.

◆ DistanceResolution

Distance resolution per gate for detection.

The resolution defines how fine-grained the distance measurement is:

  • RESOLUTION_75CM: Coarser, maximum range up to about 6 m, each gate approximately 0.75 m wide.
  • RESOLUTION_20CM: Finer, maximum range up to about 1.8 m, each gate approximately 0.20 m wide.

Use NOT_SET only as a placeholder; it is not a valid configuration value.

Enumerator
NOT_SET 

Placeholder for the initial value. Do not use as a config value (it will cause the configuration command to abort).

RESOLUTION_75CM 

Each gate is about 0.75 m, max range about 6 m.

RESOLUTION_20CM 

Each gate is about 0.20 m, max range about 1.8 m.

Definition at line 216 of file LD2410Types.h.

◆ LightControl

enum class LD2410Types::LightControl
strong

Light-dependent control status of the auxiliary output.

The radar sensor can control an external output based on ambient light level in combination with presence detection.

Use NOT_SET only as a placeholder; it is not a valid configuration value.

Enumerator
NOT_SET 

Placeholder for the initial value. Do not use as a config value (it will cause the configuration command to abort).

NO_LIGHT_CONTROL 

Output is not influenced by light levels.

LIGHT_BELOW_THRESHOLD 

Condition: light < threshold.

LIGHT_ABOVE_THRESHOLD 

Condition: light >= threshold.

Definition at line 93 of file LD2410Types.h.

◆ OutputControl

enum class LD2410Types::OutputControl
strong

Logic level behavior of the auxiliary output pin.

Determines whether the output pin is active-high or active-low in relation to presence detection.

Use NOT_SET only as a placeholder; it is not a valid configuration value.

Enumerator
NOT_SET 

Placeholder for the initial value. Do not use as a config value (it will cause the configuration command to abort).

DEFAULT_LOW_DETECTED_HIGH 

Default low, goes HIGH when detection occurs.

DEFAULT_HIGH_DETECTED_LOW 

Default high, goes LOW when detection occurs.

Definition at line 128 of file LD2410Types.h.

◆ TargetState

enum class LD2410Types::TargetState
strong

Represents the current target detection state reported by the radar.

Values can be combined internally by the sensor depending on its signal evaluation logic. The AUTO-CONFIG states are special values that are only reported while the sensor is running its self-calibration routine.

Enumerator
NO_TARGET 

No moving or stationary target detected.

MOVING_TARGET 

A moving target has been detected.

STATIONARY_TARGET 

A stationary target has been detected.

MOVING_AND_STATIONARY_TARGET 

Both moving and stationary targets detected.

AUTOCONFIG_IN_PROGRESS 

Auto-configuration routine is running.

AUTOCONFIG_SUCCESS 

Auto-configuration completed successfully.

AUTOCONFIG_FAILED 

Auto-configuration failed.

Definition at line 20 of file LD2410Types.h.