Connect Keyboard and Play2 Controller

this is for a school project, and i have one arduino duemilanove with atmega 328 (i think...)

what i want to do is connect the playstation 2 controller to the arduino, and send the information of the playstation 2 controller buttons, to the computer... i want that the computer to recognize the information as a keyboard button, for example: W;A;S;D; for directions...

please help me!!!!

What research have you done regarding this problem?

You should be able to find answers to some of your questions with some internet searching.


What kind of keyboard interface do you want to make? That is, what interface standard or protocol?

This might be of some help

But it looks like it wont be a trivial task. Good Luck

Forget the Playstation 2 Controller... What I have only now is buttons like pull-ups, that i can put to work to blink a LED... So what i am trying to do is: Connect the buttons to the Arduino Duemilanove, and then the Arduino sends the information as one key of the keyboard, to make one aplication run in the computer...

please help me with this... School project!!!

Tell us what kind of keyboard interface you want to make.

interface? i can’t understand…

it’s like this:
i have one old keyboard, that is made of matrix, the keyboard have the connection pins (connections of the matrix to the circuit os the kayboard), i have put that on a breadboard… i have the buttons (pull-ups) that have one connection side equal, right?
the keyboard is waiting for a interruption to know wich letter will send, and the buttons (pull-ups) only send one signal am i right?

now, how to make this: connect the keyboard pins of the matrix to the arduino and then when the pull-up is pressed in other pin of the arduino, the arduino makes the connection betewen the two pins that are connected the matrix making the keyboard circuit send the letter that i want…

thanks for trying to help me and i hope that you can help me…

What I mean is: what type of keyboard interface are you trying to emulate? Is the keyboard connected to the computer by a PS/2 interface? Or by an ADB interface? Or by a USB interface? Or something else?

ok now i have understand.... it's a PS/2 keyboard...

do you know how to emulate the keys? wich interface do you recomend to emulate the keys?


There's an example sketch that will read data from a PS/2 keyboard:

But you want to emulate a PS/2 keyboard, so the only useful part of that page will be the description of the wiring and the protocol. The links from that page may tell you more about the PS/2 keyboard protocol, but you may find that it gets complicated!

the problem is that i don't want to read the data... i want to send it to the keyboard...

i know that is complicated...

I haven't tried emulating a PS/2 keyboard yet, but using Follower's UsbKeyboard library I've successfully built a very simple shield that emulates a USB keyboard and sends keypress events to the host when an input on the Arduino is asserted. It sounds like that's exactly what you are trying to do, but with PS/2 instead of USB. Would USB work with your computer?

There's a video of it on YouTube that shows me controlling a game of Frozen Bubble using buttons attached to an Arduino. Because this is my first forum post I can't put the full link in, but put "/watch?v=SJlDyPws7Mk" after to get to it.