XIM Community

Tut: USB -> DualShock 4 adapter mod (W11cE Device)  (Read 109748 times)

Offline roads

  • MVP
  • *
  • Posts: 19559
    • View Profile
Re: Tut: USB -> DualShock 4 adapter mod (WIP)
« Reply #225 on: 04:27 AM - 01/12/14 »
Try a  wired Xbox controller
Crusade atm: none

Offline RuaAD

  • Member
  • *
  • Posts: 60
  • Spaniard
    • View Profile
Re: Tut: USB -> DualShock 4 adapter mod (WIP)
« Reply #226 on: 04:37 AM - 01/12/14 »
OK, im redoing whole wiring  :P :-X :-X

Offline Sully_pa

  • Member
  • *
  • Posts: 140
    • View Profile
Re: Tut: USB -> DualShock 4 adapter mod (WIP)
« Reply #227 on: 08:55 AM - 01/12/14 »
Has anyone had luck with a DS3 ? I'll have to buy a xbox 360 controller..

And this is new list with version 8 ...right? ...ordering today

 DualShock 4 controller (color does not matter)
- Teensy 3.0 (without header pins) (Teensy 3.1 will probably work, but not yet tested)
- mini USB host shield (from circuitsathome.com)
-6 MCP4151 digital potentiometers
- AWG 30 wire (multiple colors recommended!)
- A little thicker wire for 5V and ground

Offline KingAfrica

  • Member
  • *
  • Posts: 89
    • View Profile
Re: Tut: USB -> DualShock 4 adapter mod (WIP)
« Reply #228 on: 09:20 AM - 01/12/14 »
Has anyone had luck with a DS3 ? I'll have to buy a xbox 360 controller..

And this is new list with version 8 ...right? ...ordering today

 DualShock 4 controller (color does not matter)
- Teensy 3.0 (without header pins) (Teensy 3.1 will probably work, but not yet tested)
- mini USB host shield (from circuitsathome.com)
-6 MCP4151 digital potentiometers
- AWG 30 wire (multiple colors recommended!)
- A little thicker wire for 5V and ground

I used both the DS3 and xbox controller, though on xim manager I have to use the xbox controller config. Joy.cpl calibration on the DS3 was great it seemed to reach all the right values with ease in comparison with the xbox controller. I have adjusted my ballistic curves too and went on ghosts last night, my accuracy has already gone up :)

Offline RuaAD

  • Member
  • *
  • Posts: 60
  • Spaniard
    • View Profile
Re: Tut: USB -> DualShock 4 adapter mod (WIP)
« Reply #229 on: 03:02 PM - 01/12/14 »
Im on teensy 3.1 that it should work, got a wired xbox controller from a friend,  a ds3, and.... same results,it's game over for me! i got enought  >:(

Offline RuaAD

  • Member
  • *
  • Posts: 60
  • Spaniard
    • View Profile
Re: Tut: USB -> DualShock 4 adapter mod (WIP)
« Reply #230 on: 03:38 PM - 01/12/14 »
If i uncomment that ive got player 1 on DS3 !!

Code: [Select]
//#define I_DONT_HAVE_STICKS // Uncomment if you connected original sticks to teensy.
only got  inputs from buttons if i uncomment

Code: [Select]
//#define MCP4151 // Uncomment if you used MCP4131 in left joystick and triggers.
//#define MCP4151_RIGHT_STICK // Uncomment if you used MCP4131 in right joystick.

 no joystick movements at all

if comment everythink freezes... but ive got player 1... finally!!!

Offline RuaAD

  • Member
  • *
  • Posts: 60
  • Spaniard
    • View Profile
Re: Tut: USB -> DualShock 4 adapter mod (WIP)
« Reply #231 on: 03:53 PM - 01/12/14 »
Got no wiper pin's on DS4 so on teensy 14, 15, 16 & 17 nothing have to be wired right?

Offline RuaAD

  • Member
  • *
  • Posts: 60
  • Spaniard
    • View Profile
Re: Tut: USB -> DualShock 4 adapter mod (WIP)
« Reply #232 on: 04:14 PM - 01/12/14 »
@#$% i can't edit my posts..

All buttons digital triggers working, but no inputs from sticks, any help??

Code: [Select]
#define MCP4151 // Uncomment if you used MCP4131 in left joystick and triggers.
#define MCP4151_RIGHT_STICK // Uncomment if you used MCP4131 in right joystick.
//#define I_DONT_HAVE_STICKS // Uncomment if you connected original sticks to teensy.
//#define L3_CONNECTED_TO_PIN_33 // Uncomment if you have L3 connected to pin 29.
#define SPI_SPEED 4 // 0 = fastest, 7 = slowest
#define DIGITAL_TRIGGERS

Offline W11cE

  • MVP
  • *
  • Posts: 1532
    • View Profile
Re: Tut: USB -> DualShock 4 adapter mod (WIP)
« Reply #233 on: 04:19 PM - 01/12/14 »
Lets check that the code is correct. So you have all MCP4151 ? and no original joysticks connected. And digital triggers?

Offline RuaAD

  • Member
  • *
  • Posts: 60
  • Spaniard
    • View Profile
Re: Tut: USB -> DualShock 4 adapter mod (WIP)
« Reply #234 on: 04:38 PM - 01/12/14 »
That's right, 4151 MCP, no joysticks, digital triggers mod

It's crazy, because in my first attemps, and im sure about that, if i comment "I have no sticks", i got not player one, no power on DS3, all freezes, dead. But now i can comment it and DS3 player 1 is ON  :o :o

Offline W11cE

  • MVP
  • *
  • Posts: 1532
    • View Profile
Re: Tut: USB -> DualShock 4 adapter mod (WIP)
« Reply #235 on: 04:45 PM - 01/12/14 »
Ok, this would be correct then:
Code: [Select]
#define MCP4151 // Uncomment if you used MCP4131 in left joystick and triggers.
#define MCP4151_RIGHT_STICK // Uncomment if you used MCP4131 in right joystick.
#define I_DONT_HAVE_STICKS // Uncomment if you connected original sticks to teensy.
//#define L3_CONNECTED_TO_PIN_33 // Uncomment if you have L3 connected to pin 29.
#define SPI_SPEED 4 // 0 = fastest, 7 = slowest
#define DIGITAL_TRIGGERS
So, what happens with this?

Offline RuaAD

  • Member
  • *
  • Posts: 60
  • Spaniard
    • View Profile
Re: Tut: USB -> DualShock 4 adapter mod (WIP)
« Reply #236 on: 04:59 PM - 01/12/14 »
Now ive got Player 1, all buttons inputs ok, but this error loop on Arduino:

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space

I have to force end of arduino  :P


Now i have joy inputs but it moves from left, up corner to center.... no permanent center, no right forward movements

Offline W11cE

  • MVP
  • *
  • Posts: 1532
    • View Profile
Re: Tut: USB -> DualShock 4 adapter mod (WIP)
« Reply #237 on: 05:02 PM - 01/12/14 »
Ok, recalibrate. It should fix that.
That java error might be teensy 3.1 related. Shouldnt be anything serious.

Offline RuaAD

  • Member
  • *
  • Posts: 60
  • Spaniard
    • View Profile
Re: Tut: USB -> DualShock 4 adapter mod (WIP)
« Reply #238 on: 05:23 PM - 01/12/14 »
AAArrg

Can't calibrate, i do the loop DS4 to Shield Teensy to PC and cannot take a right calibration.

have try also looking at with monitor serial, but that ugly java error appears


Offline W11cE

  • MVP
  • *
  • Posts: 1532
    • View Profile
Re: Tut: USB -> DualShock 4 adapter mod (WIP)
« Reply #239 on: 06:08 PM - 01/12/14 »
Oops. This is embarrassing...
Its a software bug.
This has to be uncommented. Like this:
Code: [Select]
#define I_WANT_INFODont understand why, but if that is commented out the calibration will fail.
Im really sorry about this. Didnt test that enough before :(


Admin