Reference
Last revision 2026/02/05
This document describes SEN0682 serial communication via AT commands, covering port configuration, data output control, and platform compatibility. Refer to the command list for details.
Serial Communication
- Configure serial port settings: baud rate 921600, data bits 8, stop bits 1, parity NONE.
- Send settings: Check "Escape character auto-parsing".
- A newline character must be added at the end of the AT command. For example: AT+STREAM_CONTROL=1\n

Example: Query/Set Specific Output Range Data
1. Query Specified Output Line and Range
| Close Radar Frame Data Output | Send AT+STREAM_CONTROL=0\n | Returns OK |
|---|---|---|
| Query Specified Output Line and Range | Send AT+SPAD_OUTPUT_LINE_DATA? \n | Returns SPAD_OUTPUT_LINE_DATA=1,1,64 |
| Open Radar Frame Data Output | Send AT+STREAM_CONTROL=1\n | Returns OK |
2. Set Specified Line and Its Start and End Points
| Close Radar Frame Data Output | Send AT+STREAM_CONTROL=0\n | Returns OK |
|---|---|---|
| Set Specified Line and Its Start and End Points | ||
| Output data from points 5-15 of the first line | Send AT+SPAD_OUTPUT_LINE_DATA=1,5,15 \n | Returns OK |
| Output data from point 32 of the first line | Send AT+SPAD_OUTPUT_LINE_DATA=1,32,32 \n | Returns OK |
| Output all eight lines of data | Send AT+SPAD_OUTPUT_LINE_DATA=0,1,64 \n | Returns OK |
| Save Parameters | Send AT+SAVE_CONFIG\n | Returns OK |
| Open Radar Frame Data Output | Send AT+STREAM_CONTROL=1\n | Returns OK |
When Parameter 1 is 0, it will always output the full 64*8 data. In this case, parameters 2 and 3 are ignored.
For more communication commands, please refer to SEN0682_Configuration Command List Document-V1.0.docx
API Library
/**
* @fn DFRobot_64x8DTOF
* @brief Constructor, passing in serial port and configuration
* @param serial Hardware serial port reference
* @param config Serial port configuration (e.g., SERIAL_8N1)
* @param rxPin RX pin number (optional for platforms that support remapping)
* @param txPin TX pin number (optional for platforms that support remapping)
*/
DFRobot_64x8DTOF(HardwareSerial &serial, uint32_t config, int8_t rxPin, int8_t txPin);
/**
* @fn begin
* @brief Initialize the sensor serial port and enable data stream
* @param baudRate Serial communication baud rate (must be 921600)
* @return bool True if initialization succeeded (serial started and stream enabled), false otherwise
* @note ESP8266 and AVR platforms are not supported by this library's current implementation.
*/
bool begin(uint32_t baudRate = 921600);
/**
* @fn getData
* @brief Trigger one frame and read raw x/y/z values (no filtering)
* @param timeoutMs Timeout in milliseconds to wait for a complete frame
* @return Number of points parsed, or -1 on error/timeout
*/
int getData(uint32_t timeoutMs = 300);
/**
* @fn configMeasureMode
* @brief Configure measurement output mode — Full output (all points).
* @return bool True if configuration succeeded and stream control restored,
* false on communication error or device rejection.
*/
bool configMeasureMode(void);
/**
* @fn configMeasureMode
* @brief Configure measurement output mode — Single line.
* @param lineNum Line index to output (1..8).
* @return bool True if configuration succeeded and stream control restored,
* false on communication error or invalid arguments.
*/
bool configMeasureMode(uint8_t lineNum);
/**
* @fn configMeasureMode
* @brief Configure measurement output mode — Single point.
* @param lineNum Line index containing the point (1..8).
* @param pointNum Point index within the line (0..64).
* @return bool True if configuration succeeded and stream control restored,
* false on communication error or invalid arguments.
*/
bool configMeasureMode(uint8_t lineNum, uint8_t pointNum);
/**
* @fn configMeasureMode
* @brief Configure measurement output mode — Multi-point.
* @param lineNum Line index (1..8)
* @param startPoint Start point index within the line (1..64)
* @param endPoint End point index within the line (1..64), must be >= startPoint
* @return bool True if configuration succeeded and stream control restored,
* false on communication error or invalid arguments.
*/
bool configMeasureMode(uint8_t lineNum, uint8_t startPoint, uint8_t endPoint);
/**
* @fn configFrameMode
* @brief Configure whether sensor runs in single-frame or continuous frame mode
* @param mode Frame mode (eFrameSingle or eFrameContinuous)
* @return bool type, indicates the configuration status
* @retval true Configuration successful
* @retval false Configuration failed
*/
bool configFrameMode(eFrameMode_t mode);
Compatibility
| Platform | Work Well | Work Wrong | Untested | Remarks |
|---|---|---|---|---|
| Arduino UNO | √ | |||
| Arduino MEGA2560 | √ | |||
| Arduino Leonardo | √ | |||
| FireBeetle M0 | √ | |||
| FireBeetl 2 ESP32-E | √ | |||
| ESP8266 | √ |
Was this article helpful?
