A simple program for dualshock4 to get data from it, to exhibit lightbar demo and to control vibration generators using wired connection in linux.
Dualshock4 is known to the kernel as a HID device; like keyboard, mouse, ect... and sends data to the host computer every 4 ms. This Code is a simple example of reading the transmitted data (buttons status, built-in gyroscope data,...) and keeping it for further usages; so it can be implemented in other programs. This project also contains the code to control features of dualshock 4 such as lightbar and vibration.
for more information about HID devices: introduction to HID
for more information about the received data from DS4: PS dev wiki