PS3 controller to CV (with 32 degrees of control!)

Discussion, support, and resources for our noise making modules and kits.

Moderators: Kent, scottwilson

Post Reply
User avatar
scottwilson
Wiggling with Experience
Posts: 432
Joined: Mon Sep 16, 2013 12:54 pm

PS3 controller to CV (with 32 degrees of control!)

Post by scottwilson » Thu Nov 20, 2014 11:41 am

Just a quick heads up for anyone playing around with the nw2s::b and sad that the monome folk are having all the USB fun.

I've added support for the PS3 controller - specifically the Dualshock 3. There is a base class that will let anyone who wants to leverage the basic framework to build their own controllers as well as a fully functional PS3 to CV converter which can generate 16 different triggers and 16 separate CV outputs.

I have some fine tuning to do on the sensor inputs, but other than that it's ready to play with if you're looking for something fun to do over the upcoming days off...

Here's the mapping as it stands now:

Code: Select all

		Triggers:
	
		1 U
		2 D 
		3 L
		4 R

		5 SELECT
		6 START
		7 L3
		8 R3

		9 L2
		10 R2
		11 L1
		12 R1

		13 TRIANGLE
		14 CIRCLE
		15 CROSS
		16 SQUARE
		
		CV:
	
		1 LEFT HAT X
		2 LEFT HAT Y
		3 RIGHT HAT X
		4 RIGHT HAT Y

		5 PITCH
		6 ROLL	
		7 ACCELEROMETER X
		8 ACCELEROMETER Y

		9 L2 PRESSURE
		10 R2 PRESSURE
		11 L1 PRESSURE
		12 R1 PRESSURE

		13 TRIANGLE PRESSURE
		14 CIRCLE PRESSURE
		15 CROSS PRESSURE
		16 SQUARE PRESSURE

User avatar
mckenic
pew!pew!pew!kthnxbye!
Posts: 6347
Joined: Fri Aug 06, 2010 8:05 pm
Location: Limerick, Ireland

Post by mckenic » Thu Nov 20, 2014 11:49 am

:eek:

Wow - very, very cool! :tu: :yay:

a scanner darkly

Post by a scanner darkly » Thu Nov 20, 2014 12:54 pm

This is fantastic. I have some shopping to do this weekend.

Just checking the code, rumble and LEDs are supported as well, awesome! Are you planning on porting the PS4 library as well?

I assume using bluetooth would be too slow compared to USB?

User avatar
scottwilson
Wiggling with Experience
Posts: 432
Joined: Mon Sep 16, 2013 12:54 pm

Post by scottwilson » Thu Nov 20, 2014 1:12 pm

Bluetooth won't work simply because both devices are bluetooth clients and neither is a host, so they can't pair together.

But yes, rumble and LEDs are supported as well.

-s

User avatar
spacenoodle
Veteran Wiggler
Posts: 709
Joined: Tue Mar 20, 2012 9:00 pm
Location: Madison, WI

Post by spacenoodle » Sun Jan 29, 2017 4:59 pm

scottwilson wrote:Bluetooth won't work simply because both devices are bluetooth clients and neither is a host, so they can't pair together.

But yes, rumble and LEDs are supported as well.

-s
I've been using a PS3 controller wired to the b for a while and figured I'd get a Dualshock 4 working with it and now wirelessly. Looks like it can be a host. Let me know if you foresee any problems.

https://www.arduino.cc/en/Reference/USBHost

The USBHost library allows an Arduino Due board to appear as a USB host, enabling it to communicate with peripherals like USB mice and keyboards. USBHost does not support devices that are connected through USB hubs. This includes some keyboards that have an internal hub.


EDIT: apparently the existing USB host libraries are not compatible with the Due's native USB yet. So no wireless. But it looks like everything is written for a wired PS4 controller.

Post Reply

Return to “nw2s”