Skip to main content

getLastLibErrCode

Description

This function collects the library error code that occurred most recently.

Syntax

  • getLastLibErrCode()

Parameters

  • None

Returns

  • Returns library error code. Data type : Enumeration
CodeDescription
0DXL_LIB_OK
1DXL_LIB_PROCEEDING
2DXL_LIB_ERROR_NOT_SUPPORTED
3DXL_LIB_ERROR_TIMEOUT
4DXL_LIB_ERROR_INVAILD_ID
5DXL_LIB_ERROR_NOT_SUPPORT_BROADCAST
6DXL_LIB_ERROR_NULLPTR
7DXL_LIB_ERROR_LENGTH
8DXL_LIB_ERROR_INVAILD_ADDR
9DXL_LIB_ERROR_ADDR_LENGTH
10DXL_LIB_ERROR_BUFFER_OVERFLOW
11DXL_LIB_ERROR_PORT_NOT_OPEN
12DXL_LIB_ERROR_WRONG_PACKET
13DXL_LIB_ERROR_CHECK_SUM
14DXL_LIB_ERROR_CRC

Example

const int DXL_DIR_PIN = 2;
Dynamixel2Arduino dxl(Serial1, DXL_DIR_PIN);
Serial.print(dxl.getLastLibErrCode());