I bought my Hexy years ago (and I mean years ago!). It came with a BS2e, SC12 servo board, and IRPD. I’ve been dinking with it for quite some time, found some old code and had some fun with it.
However, I decided to make use of the Arduino interface. I had recently bought the Arduino starter kit, had some really good fun with the sample projects and messing with the programming. Well, last year I bought a Botboaruino and a SC32 board, to be more current with my project. I also bought the PS2 wireless analog controller, which brings me to my questions. On this page:
lynxmotion.com/images/html/build99f.htm
There is sample code for the Arduino, but it is 3DoF. Is there anything already written, similar to the page I list, for a 2DoF that I could download to my Botboarduino to get it walking? I started looking at the sample Arduino for the sample page but wow, that could take a while to remove that 3rd set of servos from the code.
Any help is greatly appreciated!
You’re in luck - if you have the SSC-32 or SSC-32U, there is a built-in 12DoF hexapod sequencer.
It’s just a matter of sending the right commands from the BotBoarduino.
Aloha Coleman!
So, when you use the sequencer it will store/remember them? I would prefer Arduino code to play with, if possible.
It’s a bit odd - the code to run the hex sequencer is loaded on the SSC-32’s chip.
Your microcontroller simply sends it some basic commands and the SSC-32 will take over the walking gait, but none of the commands will be stored on the SSC-32 itself.
I’m not sure I’m completely following you but what I will do is get the sequencer, do some experimenting, and then come back. My real interest is the Arduino code. I’ve been having a lot of fun with the kit I bought, and the Arduino samples for the 3DoF look really good. I had hoped there was a page for 2DoF… but I could not find it.
If you created a normal looking (rectangular) hexapod with 2DoF per leg, the SSC-32’s built-in sequencer is the way to go.
Very good, I’ll be checking this sequencer out! Thanks!
Coleman, I’ve downloaded this and I do not see the value added… how does it help with getting my bot to walk? I do not even see where I can upload to my SSC32. Sorry, is there any documentation with this?
Take a look at the guide starting at step 6 here:
lynxmotion.com/images/html/m … sembly.htm
Although you have an Arduino and it shows a BotBoarduino, just ensure that the pins are connected properly, and the two share common ground.
Regarding the commands to send:
lynxmotion.com/images/html/b … #hexseqcom
You do not upload code to the SSC-32; you need to program the Arduino so send the appropriate commands in the correct format.
Can you give me some examples of the code? If I can get all 6 legs to move, even for a small distance I could certainly expand. I’m kind of floundering here.
BTW, I’ve pretty much got the electronics hooked up on the 'bot, just need to get the thing moving and just having a hard time getting past where I am. Help!
Step 0 is to connect the servos to the SSC-32 correctly using the right pins, and ensure you have everything powered properly.
Step 1 is to set each position (low, medium and high, forward and back)
Step 2 is to set the speed.
Step 3 send the code to start the sequence:
Hex Sequencer Examples:
"LH1000 LM1400 LL1800 RH2000 RM1600 RL1200 VS3000 "
Sets the vertical servo parameters.
"LF1700 LR1300 RF1300 RR1700 HT1500 "
Sets the horizontal servo parameters.
"XL50 XR100 XS100 "
Causes the gradual left turn at 100% speed (and starts the sequencer if it is not already started).
"XL -100 XR 100 XS 50 "
Causes a left rotate in place at 50% speed.
"XSTOP "
Stops the sequencer and allows servo channels 0-5, 16-21 to be controlled using the normal servo commands.
Where, or what interface, do you type in these commands? Do you see where I am stumped? Your reference to the sequencer does not really say where to actually type these commands in. I’m putting my 'bot together, doing some side experiments with an Arduino Uno kit (my bot has the Botboarduino, btw), and I’m expecting to come up with some elaborate Arduino code. I’m all for trying the sequencer but I have looked, I really have, and I can’t find a reference as to where I put in these sequencer commands.
Sorry, I am determined to make this thing walk this time around. I bought this hexapod from Lynxmotion a long time ago and feel like I’m so close after ordering all new electronics… there IS a piece of software that I downloaded that allowed me to hook directly to the SSC-32, I’m suspecting that is where you put in these commands, but again, there is no manual I can find for that software.
You need to create the necessary code in BS2e (your microcontroller).
You can start by creating a simply program which outputs a single command via serial from the BotBoarduino.
You’ll need to understand the basics of programming in Arduino and using the Serial output command.
Without the PS2 to control the robot, what would you like it to do, and how?
Coleman, I gave up trying to get the BS2E to work. So, I asked and was directed to purchase the Botboarduino, the SSC32, and the wireless PS2 controller. I’ve purchased several books on Arduino, and an experiment kit for wiring circuits while compiling and uploading sketches to the Arduino (the kit came with an Uno, but from what I read the Botboarduino and Uno are very similar). So, my 'bot plan is to use the Botboarduino, the SSC32, and the wireless controller to make my bot walk. I also want to program a 2DOF gait with Arduino, but cannot find any sample code that might work (this is the original premise for this thread).
I understand that the PS2 controller might allow me to manually make the hexapod walk, but there are so many unknowns in this I’m about to get frustrated with the whole project again. I have read and re-read the connections for hooking up the Botboarduino and the SSC32, along with the PS2 wireless controller. I have it all wired. Now what do I do with it? Do I simply run your sequencer commands from an Arduino sketch? What would I have to do, besides include the PS2 libraries, to get that working? I know those are 2 different things and I think I would like to just focus on programming within Arduino for now. Does that make it clear what I’m asking for?
Thank you for clarifying.
]Your robot’s assembly should be similar to this page: lynxmotion.com/images/html/m … sembly.htm/:m]
]Ensure you have your electronics assembled like this: lynxmotion.com/images/assemb … wiring.jpg/:m]
]Continue the steps until step 9/:m]
]Next, you’ll need to calibrate each servo, and you can do this by creating a small Arduino program to set each servo offset (this involves using the serial print command in Arduino)/:m]
]You’ll need to send serial commands using software serial (Arduino) to pin 12 (assuming you have followed the guide above) with the Hexapod sequencer commands. If you’re not sure of the commands to send, you can take a look at the examples and simply send those to see what they do. Send one command at a time and you should see the robot react./:m]
]Once you have understood how to send hex sequencer commands to the SSC-32 via the BotBoarduino, take a look at the PS2 sample code/:m]
]Last, merge the PS2 sample code with the Hexapod code./:m]Note that creating a custom walking robot is not an easy task - it requires a thorough understanding of the code and if you’re new to robotics, you can reasonably expect it to take many weeks (part time) before you have something working. We’ve all been through it, so we understand the frustration. Rather than doing everything at once - go one step at a time. We cannot provide a detailed step by step guide since you’re using a custom robot.
Perfect! I still do not see where I put the sequencer code in, but in the spirit of “I need to work with it on my own a bit more”, I’ll verify I have everything in this list done, put the sequencer commands into a sketch and see if I can gain control of the hexy. If I run into problems then, I’ll post again. I am out of town for business over the weekend, so I won’t get to do much until next week, but yes, a little bit at a time.
I am also expanding on the Arduino experiment kit that I have. I’ve done all the experiments, playing with the code. There was a surprise in the box, an LCD display, which I played with a bit this morning. I have a question there, but will post it in the correct forum.
Thank you!