Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Arduino USB+BT PS3 Controller

branch: master
README
== First of all ==
PS Remote Controller Bluetooth stack for Arduino with USB Host Shield / Arduino MEGA ADK
Copyright (C) 2010 Tomo Tanaka Original written WiiRemote Stack adapted for using with PS3 Controller
Copyright (C) 2011 Cubexed

This program is based on <wiiblue.pde> which is developed by Richard Ibbotson.
This program also needs MAX3421E and USB libraries for Arduino written by Oleg Mazurov.
This program is based on WiiRemote code from https://github.com/moyuchin/WiiRemote_on_Arduino

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

== Hardware Requirement ==
	Case 1:
		* Arduino 
		* USB Host Shield
	Case 2:
		* Arduino Mega ADK (USB Host included)
		
	* USB Bluetooth Device


== Software Requirement ==
	Case 1:
		* MAX3421E and USB library for Arduino written by Oleg Mazurov
		The source codes can be grabbed from https://github.com/felis/USB_Host_Shield
		
	Case 2:
		*Same Libraries adapted for Arduino Mega ADK:
		http://labs.arduino.cc/uploads/ADK/GettingStarted/arduino_bundle_ADB.zip
	
	Open Downloaded Library and copy these files to a folder with PSRemote files:
        * Max3421e_constants.h 
        * Max3421e.h         
        * Max3421e.cpp      
        * ch9.h         
        * Usb.h 
        * Usb.cpp
		
	So it must look something like this
	
== Files ==
	Folder/
		|  --Wii version written by tomo--adapted to PS by Cubex--
		+- Example.pde
		+- PSRemote.h
		+- PSRemote.cpp
		+- README.txt
		|
		|  --Written by oleg--
		+- Max3421e_constants.h
		+- Max3421e.h        
		+- Max3421e.cpp         
		+- ch9.h           
		+- Usb.h                
		+- Usb.cpp 


== Usage ==
Same as USB version library
getBDADDR() and setBDADDR() are just for compatibility, they do nothing
rename header and constructor to "PSRemote" or see the example!

Added Functions:

getPSADDR(): gets connected PS bt address
LED(): sets LED only without affecting rumble
Rumble(): set Rumble without changing LEDs

=== Modify USB Device Descriptors ===
The values of CSR_VID and CSR_PID described in PSRemote.h need to be modified
to match descriptors of USB Bluetooth Device to be used.

Default is configured for CSR chips (like mine)


== Hint ==
--Hints from PS3 and Wiimote game controllers thread in Circuit@Home.
    - Bluetooth 1.x seems not work on this library.
	
--Bluetooth Docs:

HCI, L2CAP,... Doc: https://www.bluetooth.org/docman/handlers/DownloadDoc.ashx?doc_id=40560

BT HID profile Doc: https://www.bluetooth.org/docman/handlers/DownloadDoc.ashx?doc_id=7108

--Sixaxis/DualShock3 Info:

Windows Driver/Pairing: MotionInJoy
Linux Pairing: sixaxis.c source file
Mac: I dont know but i seem some

http://www.pabr.org/sixlinux/sixlinux.en.html
http://wiki.ps2dev.org/ps3:hardware:sixaxis
http://wiibrew.org/wiki/Sixaxis

== ACKNOWLEDGEMENT & INFO ==
I appreciate the gread codes developed by Oleg, Richard and Tomo :-)

--What Does?--

-HCI Waits for PS Remote (Remenber to Pair with your BT Dongle!!!)
Then Accepts connect Req and goes to L2CAP

-L2CAP responses two Connection Req from PSRemote (HID Control and HID Interrupt)
Then configures it and then passed to HID

-Initializates PS Controller and lights all Leds

-???

-Profit 

I started this because noone has taken initiative with PS (unlike Wii)
Something went wrong with that request. Please try again.