Phoenix code running on an Arduino Mega with an SSC-32

The code on the Lynxmotion GitHub is the latest version that Kurte gave us to test. It’s not 100% but it’s pretty damn close 8)

Keep in mind that you’ll have to edit the config file so that the code matches your measurements as the code is only fit for the CH3-R.

Yes i am not really at that point right now.
Just verifying if it can be done.

I will design my own mini frame.
Should i keep something in mind while designing ?

hi kurt, u have source code GP player attack mode for Botboardduino?

Sir I use PS2 wiresless, do you have a description of each function button ps2 wireless?
because I am confused as to the function of the X button and the button box, my robot moves very strange hahha

For the most part the PS2 code should work the same on the Arduino as it did with the original code running on a Basic Atom Pro processor.

The X button I believe turned on the mode that allows you to run sequences that are stored on your SSC-32 (assuming you have any). However this mode will only work, if you have an SSC-32 that has a firware version that Genaral purpose Sequences. Details about this are in the online manual: lynxmotion.com/images/html/build137.htm. Also in order to run a sequence you have to have sequences stored on your SSC-32. These can be generated by the program SEQ, or you can use Zentas PEP excel spreadsheet, and for some robots like a Phoenix, you may be able to find some to download.

Kurt

Buy the teensy 2.0++ it has a usb mini port on it, I find that handy’er then having to solder headers to it, less hassle.
pjrc.com/teensy/

–Aaron

ouwh u mean x button will work if i have sequences code? so i must have SSC-32 Sequencer software? I use last firmware 2-07EGP_A1A.abl all button work perfect only x and box button not work :laughing:

Oh about the Zentas PEP excel, any explanation for how use it step by step?

thanks

Read the manual. Its not updated to the latest version but should give you the picture of how it work.

thanks zenta

hmm
I have download code for UNO and try to compile but get some error report

PS2X_lib/PS2X_lib.cpp.o: In function `PS2X::NewButtonState()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/PS2X_lib/PS2X_lib.cpp:22: multiple definition of `PS2X::NewButtonState()'
PS2X_lib.cpp.o:PS2X_lib.cpp:18: first defined here
PS2X_lib/PS2X_lib.cpp.o: In function `PS2X::NewButtonState(unsigned int)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/PS2X_lib/PS2X_lib.cpp:27: multiple definition of `PS2X::NewButtonState(unsigned int)'
PS2X_lib.cpp.o:PS2X_lib.cpp:23: first defined here
PS2X_lib/PS2X_lib.cpp.o: In function `PS2X::ButtonPressed(unsigned int)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/PS2X_lib/PS2X_lib.cpp:31: multiple definition of `PS2X::ButtonPressed(unsigned int)'
PS2X_lib.cpp.o:PS2X_lib.cpp:27: first defined here
PS2X_lib/PS2X_lib.cpp.o: In function `PS2X::ButtonReleased(unsigned int)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/PS2X_lib/PS2X_lib.cpp:35: multiple definition of `PS2X::ButtonReleased(unsigned int)'
PS2X_lib.cpp.o:PS2X_lib.cpp:31: first defined here
PS2X_lib/PS2X_lib.cpp.o: In function `PS2X::Button(unsigned int)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/PS2X_lib/PS2X_lib.cpp:39: multiple definition of `PS2X::Button(unsigned int)'
PS2X_lib.cpp.o:PS2X_lib.cpp:35: first defined here
PS2X_lib/PS2X_lib.cpp.o: In function `PS2X::ButtonDataByte()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/PS2X_lib/PS2X_lib.cpp:43: multiple definition of `PS2X::ButtonDataByte()'
PS2X_lib.cpp.o:PS2X_lib.cpp:39: first defined here
PS2X_lib/PS2X_lib.cpp.o: In function `PS2X::Analog(unsigned char)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/PS2X_lib/PS2X_lib.cpp:47: multiple definition of `PS2X::Analog(unsigned char)'
PS2X_lib.cpp.o:PS2X_lib.cpp:43: first defined here
PS2X_lib/PS2X_lib.cpp.o: In function `PS2X::readType()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/PS2X_lib/PS2X_lib.cpp:350: multiple definition of `PS2X::readType()'
PS2X_lib.cpp.o:PS2X_lib.cpp:293: first defined here
PS2X_lib/PS2X_lib.cpp.o: In function `PS2X::_gamepad_shiftinout(char)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/PS2X_lib/PS2X_lib.cpp:50: multiple definition of `PS2X::_gamepad_shiftinout(char)'
PS2X_lib.cpp.o:PS2X_lib.cpp:46: first defined here
PS2X_lib/PS2X_lib.cpp.o: In function `PS2X::sendCommandString(unsigned char*, unsigned char)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/PS2X_lib/PS2X_lib.cpp:287: multiple definition of `PS2X::sendCommandString(unsigned char*, unsigned char)'
PS2X_lib.cpp.o:PS2X_lib.cpp:224: first defined here
PS2X_lib/PS2X_lib.cpp.o: In function `PS2X::reconfig_gamepad()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/PS2X_lib/PS2X_lib.cpp:384: multiple definition of `PS2X::reconfig_gamepad()'
PS2X_lib.cpp.o:PS2X_lib.cpp:327: first defined here
PS2X_lib/PS2X_lib.cpp.o: In function `PS2X::enableRumble()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/PS2X_lib/PS2X_lib.cpp:359: multiple definition of `PS2X::enableRumble()'
PS2X_lib.cpp.o:PS2X_lib.cpp:302: first defined here
PS2X_lib/PS2X_lib.cpp.o: In function `PS2X::read_gamepad(unsigned char, unsigned char)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/PS2X_lib/PS2X_lib.cpp:78: multiple definition of `PS2X::read_gamepad(unsigned char, unsigned char)'
PS2X_lib.cpp.o:PS2X_lib.cpp:66: first defined here
PS2X_lib/PS2X_lib.cpp.o: In function `PS2X::read_gamepad()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/PS2X_lib/PS2X_lib.cpp:74: multiple definition of `PS2X::read_gamepad()'
PS2X_lib.cpp.o:PS2X_lib.cpp:62: first defined here
PS2X_lib/PS2X_lib.cpp.o: In function `PS2X::enablePressures()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/PS2X_lib/PS2X_lib.cpp:368: multiple definition of `PS2X::enablePressures()'
PS2X_lib.cpp.o:PS2X_lib.cpp:311: first defined here
PS2X_lib/PS2X_lib.cpp.o: In function `PS2X::config_gamepad(unsigned char, unsigned char, unsigned char, unsigned char, bool, bool)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/PS2X_lib/PS2X_lib.cpp:166: multiple definition of `PS2X::config_gamepad(unsigned char, unsigned char, unsigned char, unsigned char, bool, bool)'
PS2X_lib.cpp.o:PS2X_lib.cpp:127: first defined here
PS2X_lib/PS2X_lib.cpp.o: In function `PS2X::config_gamepad(unsigned char, unsigned char, unsigned char, unsigned char)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/PS2X_lib/PS2X_lib.cpp:161: multiple definition of `PS2X::config_gamepad(unsigned char, unsigned char, unsigned char, unsigned char)'
PS2X_lib.cpp.o:PS2X_lib.cpp:122: first defined here

Update:

Finally I was success to compile and uploadit to my UNO,

but, I have a little problem again,

When I press a switch ON, my robot directly in standing position, though I haven’t pressed the start button on my stick PS2 controller

check ssc-32 configuration. possible loading startup positions and uno not connecting.

thanks bro my problem has ben solved :slight_smile:

hello every one… :slight_smile: (i’m newbie on this forum…)
1 year ago, I have succesfull to build 6 leg 3 DOF using arduino UNO + Phoenix code (like on page 4) and it’s walk…
2 days ago I have problem… PS2 wireless can not connect to receiver, in debugserial show something like this :
"Check GP Enable: …show some string…GP
No controller found. "

If I upload PS2 sketch to UNO from Library/example code (not phoenix code), it’s still working good.

Please help me.

Did any of the Phoenix code change? Which version of the Phoenix code are you using? My latest stuff up on www.github.com/kurte

Check to make sure we are calling off to the PS2 init code with the correct IO pins. They are defined in the CFG header file…

Kurt

Hey Kurt, awesome work on this stuff. It was your port of the Phoenix code that gave me my internal green light to build my hexapod. Thanks a lot!

Now that I’ve got the little guy built, I’m ready to start implementing and tweaking your arduino code. I’ve checked out your github, but I only see .h files. Could you give me a quick checklist of things to do to get started? I don’t see what actually runs on the arduino. Also, do I need to flash sequences into the SSC-32 for this to work?

Thanks again for doing all this, much appreciated!

Duane

Yep, there is more details on why all of the code is in header files up on the thread: viewtopic.php?f=8&t=8187

The simple reason is that with Arduino libraries, you can not pass in project specific parameters to compile the code. So for example if in your code you do not want the GP Sequence code compiled in, as maybe you need the code space, then you are out of luck if it is a .cpp file as it gets compiled once for all projects. So to work around this, I put all of the code in header files. If you copy each of these directories into your Arduino Library folder …\My Documents\Arduino\Libraries
You can see some different projects I configured up, by going to the file menu and look under the Examples menu item under the Phoenix library.

Hope that helps.

Kurt

hi…Kurt.
I try this :

  • reconfigure UNO IO pins to PS2 Receiver in CFG header file,
  • Update SSC32 firmware to the last version…
    and it’s WORKS :smiley:
    Thanks Kurt

Hi Kurt,

it is with the current Phoenix code on github possible to define two inputs simultaneously?
I usually control my bot via PS2, but I’m currently developing a Java control program and I don’t want to always reprogram the Arduino.

Greetings
Daniel

Just a side note: Over the last couple of days, I finally converted my Phoenix from being run on an Arc32, to currently running with an SSC-32 and the Botboarduino. I resisted up till now, as I wanted to keep a hex robot running on our BAP/ARC32 code base. But as we have not done any real development on this code base for quite awhile, I finally broke down and converted it to the Arduino world. Currently I have it running with a PS2 for input.

Over the next couple of days, I will play with it to see if I need to make any fine tunings, but I have all of the offsets, Min/Max and start positions set the same as when it was running with the ARC32. I created a default Example Sketch under the Phoenix library, which I uploaded to my github project (github.com/KurtE/Arduino_Phoenix_Parts).

My guess is soon I will replace the Botboarduino with either one of my Linux boxes or maybe my Teensy 3.1 (not sure yet which one)

That’s an awesome news Kurt… :wink: