Putting robotics at your service™

Free shipping on orders over $200

Connecting PS2 to Axon

Print view Share :
Previous topicNext topic

Page 1 of 1 [ 5 posts ]

New ( offline )
Posts: 6
Posted: 2010-06-29 12:59 
 Post subject: Connecting PS2 to Axon
Hello,

How do I connect a wireless PS2 controller to the Axon and where does it connect? I'm thinking about buying Lynxmotion PS2, Part # RC-01. Also, will I need PS2 controller cable kit. Part #PS2DIY-KT to make the PS2 controller work with the Axon? I'm using the Axon on a 18 DOF 6 leg hexapod, I downloaded and using WGhost9's source code. Thanks for any help.


User avatar
Guru ( offline )
Posts: 4908
Posted: 2010-06-29 13:22 
When it comes to the Axon, there are lots more people up on the SOR forums: http://www.societyofrobots.com/robotforum/index.php

However I have a Brat with an Axon2 in it that does support the PS2. There is information up on the thread: viewtopic.php?f=7&t=5876. This thread includes a zip file with a check point of my code including the PS2 code. My code uses webbotlib.

For the PS2 on the Axon2 I am using K4-K7. There are defines for these at the start of the PS2 code. You should be able to move them to other pins on the Axon... I am using the Lynxmotion PS2 and the DIY kit that you do mention.

Kurt


User avatar
Guru ( offline )
Posts: 4908
Posted: 2010-06-29 16:18 
A quick update here. I forgot to mention this, but after I implemented my own PS2 code another member up on SOR generated some nice PS2 code for the Arduino environment (http://www.societyofrobots.com/robotfor ... ic=11299.0).

Also Webbotlib now has PS2 support as part of the library as well. You can see more details in the PDF file that is downloaded with each build. You can download from: http://sourceforge.net/projects/webbotavrclib/

Kurt


New ( offline )
Posts: 6
Posted: 2010-07-11 13:02 
Hello,

I bought a wireless PS2 controller/receiver from Lynxmotion. Where does cable one and cable two connect on an Axon? Their instructions shows that cable two, the black wire is ground, red in 5vdc, and the yellow is P15 (this is on a Bot Board II) On cable one, the black wire is P12, red wire is P13, and yellow wire is P14 (this is on a Bot Board II) Now where does these same wires connect on an Axon I not an Axon II. I don't have an Axon II, so I don't know if it is the same as an Axon I or not. I have cable two connected to the ADC side and when I power up the Axon, two LED's light up, one is flashing until I power up the controller and then it stays on. Not sure where to connect cable one, I don't want to burn anything up. Here is a link to the instructions to connect the receiver to a Bot Board II. http://www.lynxmotion.com/images/html/build162.htm
Thanks for any help.


User avatar
Guru ( offline )
Posts: 4908
Posted: 2010-07-11 14:44 
The way I figure it out is, the order of the pins on the PS2 receiver is:
Code:
Dat - Cable 1 - Black - P12
cmd - C1 - Red - P13
?

GND - C2 - Black
+5v - C2 - Red
Sel - C1 - Yellow - P14

CLK - C2 - Yellow - P15
?
ACK


I put some blank lines above as the wires in the PS2 receiver are grouped in 3 wires per group. On some of my receivers I put a piece of tape on top of them and label them as such. The P numbers are the Bot Board 2 pin numbers.

Ok Now which pins do you use on an Axon? It probably depends on what software you are using to control it. On My Axon2 using my own functions, I use:
Code:
#define PS2_DAT      K4
#define PS2_CMD      K5
#define PS2_SEL      K6
#define PS2_CLK      K7


I believe these pins are available on the Axon as well. If you are using webbotlib and look at his example, I think he uses pin F0 for the select and for a software version of an SPI bus he uses pins B5, B6, B7 as B5=MOSI(CMD), B6=MISO(DAT), B7=CLK and F0=SEL

So which pins you choose is up to you, you just need to tell which ever software what pins you ended up using.

Kurt


 

All times are UTC - 5 hours [ DST ]. It is currently 2014-09-30 13:52
Feedback Form
Feedback Form