As I mentioned in another issue today. @mjs513 and myself have been working on the Teensy T3.6/T4.1 library USBHost_t36 that adds USB Host support including Bluetooth and Joysticks including the PS4... So when I find issues with some devices like clone PS4s that will not connect, I try other hardware and libraries to see if they work on the alternatives...
Also Trossen Robotics now has a setup of their PhantomX using a PS4 and ESP32 using this library to then talk to an OpenCM 9.04 board, which I would like to extend.
So while playing with an ESP32 and this library, I thought I would see if this library exposes some of the additional information that one of our USBHost Joystick sketch exposes, such as the touchpad as well as the Gyro and Accel sensors. Which I found was not currently implemented. Looked like there was a start of this, but code was commented out.
As I mentioned in another issue today. @mjs513 and myself have been working on the Teensy T3.6/T4.1 library USBHost_t36 that adds USB Host support including Bluetooth and Joysticks including the PS4... So when I find issues with some devices like clone PS4s that will not connect, I try other hardware and libraries to see if they work on the alternatives...
Also Trossen Robotics now has a setup of their PhantomX using a PS4 and ESP32 using this library to then talk to an OpenCM 9.04 board, which I would like to extend.
So while playing with an ESP32 and this library, I thought I would see if this library exposes some of the additional information that one of our USBHost Joystick sketch exposes, such as the touchpad as well as the Gyro and Accel sensors. Which I found was not currently implemented. Looked like there was a start of this, but code was commented out.
So I added some code to extract that as part of a test sketch, which I added to my fork/branch: https://github.com/KurtE/PS4-esp32/tree/build_fixes
Most of the interesting stuff is in the lines:
Note: most of these lines add 12 to an index as the arrays of data we are processing are indexed slightly differently: Most of this code comes from the file: https://github.com/PaulStoffregen/USBHost_t36/blob/master/examples/Joystick/ps4Helpers.ino And the indexes I am working off of are shown in the file: https://github.com/PaulStoffregen/USBHost_t36/blob/master/joystick.cpp#L1021
Not sure if you wish to integrate any of this in your library and/or potentially document it somewhere for sketches to do something similar.
Kurt