T3.6 USB Host - Joysticks

Hi Guys

Just would like to say thanks again.
Project "Stewart Platform with SpaceNavigator" makes progresses
https://youtu.be/_2E9TFUtqp8
IMG_4287_small.jpg
 
Has anyone had trouble reading the directional inputs from a ps4 controller to their teensy? I have a teensy4.1 and when I connect a ps3 or xbox controller to it, I can read all the button inputs correctly. But if I plug in a ps4 controller, I can read all the buttons and axis, except for the dpad. Do I have to do something special for ps4 controllers?
 
Has anyone had trouble reading the directional inputs from a ps4 controller to their teensy? I have a teensy4.1 and when I connect a ps3 or xbox controller to it, I can read all the button inputs correctly. But if I plug in a ps4 controller, I can read all the buttons and axis, except for the dpad. Do I have to do something special for ps4 controllers?

I figured it out, the dpad inputs are not part of the "getButtons()" call from JoystickController. Its sent as "axis(9)"
 
Interesting. Looking at the PS4 controller test code I used last summer I was able to access the dpad this way:

buttons = joystick1.getButtons();

if(buttons == 0x00000)
but_UP = true;
else
but_UP = false;

if(buttons == 0x00004)
but_DOWN = true;
else
but_DOWN = false;

etc...

However, I found playstation controllers on teensy 4.1 native usb to be missing features, confusing and buggy as compared to the host shield 2.0 library so I abandoned it. Most recently PS5 controller working great with the shield.
 
Back
Top