Working on a hexapod and bought a Pololu Maestro24 for my hexapod robot. I want to be able to control it off-line using a PS2 handle running through an Arduino Nano to the pololu. I found Bill porters site that connects to The curious inventors site that has some good info like how to wire the PS2 handle to an arduino and the sample code needed to program the arduino to understand the PS2 handles commands. There is also a pololu\arduino library. <p>
Ive compiled the sample code and uploaded it to my arduino and im pretty sure it works. And i know now how to activate a pololu using the Arduino but im completely lost and stuck on the part of the TTL byte packets. I need to know what byte packets the PS2handle/arduino pair sends through the TTL to the Maestro. With this info i can then activate the pololu.
Ive been on the Arduino forum and have not received an answer. Im hoping y'all can help me.
Ill have to do links to the second post but on the Curious inventors site, at the bottom half there are two Zips, one says commander the other says listener. I was hoping that these would be apps to help me answer my question but i dont see how to open them there are no exe's. Maybe theres another way to use the zips?
Bill Porter PS2 handle
Bill Porter PS2 handle site…
http://www.billporter.info/2010/06/05/playstation-2-controller-arduino-library-v1-0/
The curious inventor PS2 handle site.......
http://store.curiousinventor.com/guides/PS2
The link to the PS2 handle/arduino Library is on the Bill Porter site.
According to pololu yes I
According to pololu yes I can. But i need to the byte packets in compact protocol. Im assuming the sample code is printing through the serial on the Arduino. If so thats all i need is sent when a button is pressed.
Also there are numbers listed in the PS2lib.h file after each button press constants that look like some kind of protocol but i font know what. 1x0100, 1x2000, etc
Ok I found
Ok I found this…
It looks like the button constants are the "0x0000" numbers. Do you know the name of the protocol this is?
Ok i think i figured it out.
Ok i think i figured it out. I need to turn (ex) “0x0000” to decimal, then from there convert it to Hex which is what i need for the pololu to read and then execute the command connected to that byte packet.
I tell you ive been looking fir that info for weeks and nothing poppped up til today.
Sorry i thought i added this
Sorry i thought i added this libk to the arduino playground PSX tutorial…
http://playground.arduino.cc/Main/PSXLibrary
The pololu does not accept commands from the PS2 handle directly. I used bill porters libraries list in the links above to code my arduino nano to accept and transmit the byte packets to the pololu.
Im pretty sure my code is working. When i press a button the lil led lights up though i guess i could hook it back up to the IDE and look at the serial window when pressing buttons.
The numbers listed are the numbers that get sent through the serial to the Marstro. According to pololu i just need to convert the 0x00000 to the compact protocol (ex) "0xAA". I send a byte to open communication then the command byte sent from the paired arduino-pololu.
Ok im a lil confused. On
Ok im a lil confused. On this page…
http://playground.arduino.cc/Main/PSXLibrary
It says........" Each button is defined in the library, so there is no need to use hex codes when testing." Ok is the arduino sending Hexidecimal or the "0x0000" through the serial.
When i look at the Library.h C++ file theres a ton of hexidecimal. I need to know what its actually sending.