Integrate head control

Hello,
I am running the brilliant Phoenix hexapod code on Arduino Mega and SSC-32 for my Phoenix hexapod, works great!

I wish to add a head, (using the head to hold/hide a side to side scanning VL53L0X) as i am working on autonomous control (as well as PS2). I guess i could try to just pass serial data for the head servos with direct serial write to the SSC-32 but maybe this would conflict with the serial data coming from the phoenix control, so, my question, has anyone any hints how to integrate extra servos into the phoenix code, so the servo positions for the extra servos get passed to the SSC-32 along with the servo serial data for the legs? Or has someone already written phoenix for Arduino with head and tail for A pod? (i read hundreds of posts but cannot find this).

Sorry if this is a dumb question, i’m really new at this and no code expert.

Kind regards
Ade

Hi Ade,

That sounds great! You should totally post about it here (hint: pictures & videos) and/or here! The RobotShop community is always curious about what people are doing with their robot kits, parts, etc.!

That is a great idea! Of course, this will most likely not be trivial if you want to re-use the existing Phoenix code, such as the version we have here.

As you mention here, having 2 or more sources of output for the SSC-32U’s single serial interface is a Bad Idea™.

The best would be to start by looking at the currently available code and see what needs to be modified to add extra DoFs. See the next answer below for more details.

We do not know of a reliable source for such a source code/example. The original A-Pod was created by Zenta using the BotBoard, not the BotBoarduino (which did not exist at the time, most likely). Actually, the original Phoenix code was ported from the BotBoard (made by a third person, Xan) to the BotBoarduino by KurtE, who would probably know the best about how to modify it to add extra DoFs (degrees of freedom). You can see a bit about the A-Pod situation with the current BotBoarduino Phoenix code here.

No one starts as an expert at anything! :wink: The will to learn is all that is important here. We are glad to help!

We apologize we cannot be of more direct help. The simple answer is that you would simply need to experiment with the code and try stuff out. Please post again here if you do, we would certainly be more than interested to see your results and are certainly open to discuss it further.

Sincerely,

Hi Sebastien,
Thank you for your great answer, this is really helpful, especially the link to the Kurte’s Orion Ant code.
i managed to ‘pick’ into the code to add an additional gait which allows me to use the gait mode to switch from PS2 contol to autonomous (and back) and from the clues i was given here use sensor values to control the hex, so, i will start ‘picking’ again with your clue and look at the 4DoF side.
When i get this working i will post some info and pics/vids and my code and hope it is of some use to someone else.
Many thanks again Sebastien :slight_smile:
Ade

Hi Ade,

It is great to hear my answer was helpful!

When you have the code working reasonably well, we can possibly add it to the Lynxmotion GitHub so other people can find it easily too. I know there has been requests for this kind of code from many people over the years…

Good luck with it, and keep us updated!

Sincerely,

Hello Sebastien,
I will do, but it will be about 1 month away, as i am waiting for some legs parts and learning 3d printing at the moment to make a head frame to mount the sensors on. When i have the leg parts i will start making some picture to post as i progress.

I think my C++ skills will need ‘cleaning up’ by an expert before posting on GitHub :slight_smile:

Kind regards
Aded