Controller help with the HERO?

Our team recently bought a couple CTR HEROs, and we’ve been working on programing them. However, I haven’t been able to successfully connect a PS4 controller in code. I’m connecting to the USB-A port on the HERO; I’ve tried starting the code with the controller plugged in, out, and cycling while its on.

Here is the code:
https://lh6.googleusercontent.com/sa3IB5MWtpChi4oExvtERURMBKoPhsVJkZutVuMXgyBB87C3yrYvb50fHGcx339KedT37DZ_S5ZYzIw=w1280-h682

Do I need a different controller? Is my code wrong? Also, if the PS4 controller is compatible, is there any way to use it wirelessly with a bluetooth dongle or something?

Any help is greatly appreciated, thanks!

I know that for using a PS3/4 Controller on Windows, you need to use some special software from either Motioninjoy or ScpToolkit in order for the gamepad to be recognized by your computer. This is because the PS4 gamepads do not send their control outputs over a universally-recognizable format, like that of the Logitech F310 or Rock Candy Xbox 360 controller. These controllers use a control format called Xinput (some DirectInput as well) which is easily recognized by PC, and likely, your HERO board. I would recommend picking up a Logitech F310 at GameStop or Walmart, they are super cheap and work great.

EDIT: After reading through CTRE’s User Guide for the HERO, it is recommended to use an F310 in DirectInput mode to control your robot as this sends generic HID commands to your computer/HERO. As I assumed, the Rock Candy gamepad or any PS3/4 controllers use special drivers and inputs to send their control inputs to the computer, so they presumably wouldn’t work with your HERO.

Hey Alex, ATM the HERO supports basic HID USB gamepads (like the F310 or F710 USB Logitech gamepads). The ps4 controller seems to require a special driver. If I have time I’ll take a look to see if it’s easy to add to HERO, but in the meantime I’d recommend one of the suggested gamepads in our manual (or any basic HID device).

MotionInJoy is a hassle to get working correctly, and you have to be online to get most things to work. That being said, there is a patch to use it offline that I recommend here.

Yeah, PS4 controllers don’t show up as standard HID controllers that I’m aware of… maybe there is a way to do it but I haven’t found it.

The HERO’s libraries need standard HID devices (like ATM machines and NIC cards).

OK, thank you everyone for your help!