User Manual

- 6 -
Open the terminal, type sudo cp libhps3d.so /usr/local/lib/, copy libhps3d.so to the /usr/local/lib/
directory; then execute sudo ldconfig to load it.
After writing the test code in main.c, type: gcc main.c -L./ -lhps3d -o app in the terminal, compile
the connection, and then use sudo ./app to execute the program.
Select the connectable device. After the initialization is successful, the measurement result can
be output normally:
2.1.3 Use SDK in user project
1. In project, it includes head file, example code:
#include
"api.h"
2. Call the device connection function, before you need to enter the handle->DeviceName device
name path, this function gets the handle->DeviceFd device file descriptor and
handle->ConnectStatus connection status (true). The Handle->DeviceFd device file descriptor is
required for all command function interfaces. Sample code: