Jump to content

ps3 controller to mouse

- - - - -

  • Please log in to reply
3 replies to this topic

#1
imagiro

imagiro

    Newbie

  • Members
  • Pip
  • 2 posts
Hey guys,

I apologize if there is already a similar post on this but i couldn't quite find one. Basically I'm wanting to write a program that starts up upon connecting my ps3 controller to my computer via usb and syncs the inputs to preset keyboard/mouse inputs just like you get when you connect a keyboard or a mouse.

I'm quite new to programming and don't know where to start or even what to google to get the know how. A few suggestions for this would help heaps, I want this more for experience than usability. I'd preferably wanna work in C/C++ or C# as I run windows and have visual studio 2010.

Cheers,
Andrew

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
Welcome,
A Playstation 3 controller can be used on the PC with a simple driver installation:
SIXAXIS driver for PC - Tools and Utilities - Playstation 3 - QuickJump Downloads

From there the computer will recognize it as a gamepad device (like a joystick). You can use a library such as libusb with C or C++ to handle the input and hook Windows input to it, but this will be a fairly hard task for a person who is new to programming..

You can technically use an input emulation software, to use a joystick as a mouse here:
FreewareWeb - Freeware: Joystick 2 Mouse 3 - use joystick as mouse / to control mouse

It is not doing it programmatically, but I am just not sure to recommend you program it yourself, it would be a very frustrating task for a new programmer to learn what is required and debug drivers.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
lor

lor

    Programming Goddess

  • Members
  • PipPipPipPipPipPipPip
  • 884 posts
Do you specifically want to use a PS3 controller or could you use a different controller, say a microcontroller?
There is a board which allows you to use as a mouse - ADNS2620 Mouse Sensor Evaluation Board - SparkFun Electronics


#4
imagiro

imagiro

    Newbie

  • Members
  • Pip
  • 2 posts
Nullw0rm,

That sounds like a good place to start cheers, I already tried using the driver and then controlMK however I didn't like how I had to run the driver each time I put the controller in.

lor,

I just wanted it with ps3 controller as I have a ps3 controller and I left my mouse behind at my old flat so wanted a project that would help me get coding and actually be useful to me.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users