Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Controller help with the HERO? (http://www.chiefdelphi.com/forums/showthread.php?t=151240)

AlexNeedsAName 09-14-2016 05:00 PM

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:


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!

EmileH 09-14-2016 05:25 PM

Re: Controller help with the HERO?
 
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.

ozrien 09-14-2016 05:30 PM

Re: Controller help with the 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).

Gravity 09-15-2016 12:54 PM

Re: Controller help with the HERO?
 
Quote:

Originally Posted by EmileH (Post 1606815)
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.

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.

marshall 09-15-2016 04:24 PM

Re: Controller help with the HERO?
 
Quote:

Originally Posted by ozrien (Post 1606819)
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).

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).

AlexNeedsAName 09-16-2016 04:46 PM

Re: Controller help with the HERO?
 
OK, thank you everyone for your help!


All times are GMT -5. The time now is 01:08 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi