Sony PS2 Wireless Controller
ajward
Posts: 1,130
Hi All...
In a recent attempt to increase the number of unfinished projects on my desk, I started exploring the Sony controller in the subject line and the IR receiver. The controller and receiver were packaged with one of my robots.
Just wondering if anyone has any experience adapting this unit for use with a Stamp or Propeller? (Googling doesn't seem to turn up much. Maybe for a reason!)
Nothing specific in mind. I'd be happy if I could push a button on the controller and light up an LED across the room. Gotta start somewhere! :->
Just a learning exercise... I always want to know how something works.
Thanks for any wisdom!
Amanda
In a recent attempt to increase the number of unfinished projects on my desk, I started exploring the Sony controller in the subject line and the IR receiver. The controller and receiver were packaged with one of my robots.
Just wondering if anyone has any experience adapting this unit for use with a Stamp or Propeller? (Googling doesn't seem to turn up much. Maybe for a reason!)
Nothing specific in mind. I'd be happy if I could push a button on the controller and light up an LED across the room. Gotta start somewhere! :->
Just a learning exercise... I always want to know how something works.
Thanks for any wisdom!
Amanda
Comments
There are several objects in the OBEX for the PlayStation 2 Controller. There's even one that takes advantage of the PS2's analog buttons.
Paul K. has used a wireless PS2 controller with his hexapods.
I'm using a wired PS2 controller with my robot remote project.
I'm not sure if any of the objects would need to be altered to use with a wireless version of the controller. Paul K. used a wireless version with a Propeller so if a change to the code does need to be made to work with a wireless controller, the necessary change has been documented somewhere.
BTW, I've found most generic game controllers have lower resolution ADC chips than the original version of a controller. SparkFun sells/sold a generic PS2 controller and I was disappointed to see the joystick data was 5-bits scaled to 8-bits instead of true 8-bit values like the Sony version used.
I think JonnyMac published a couple of Nuts & Volts articles about the PS2 controller. IIRC, there was some sort of change in the protocol sent from a wireless controller when compared with the wired version.
While the code found in the first link can read the analog buttons, I'm not aware of any Propeller code which uses the Dual Shock motors. I don't think this would be very hard to add since the Dual Shock protocol has been documented but I haven't taken the time to add it to the code. IIRC, I didn't have a good way to power the motors when I was adding the analog button code so I didn't attempt to add the motor control feature. I do plan to add this to the code in the future.