BH-3 Hexapod

Hello again. I completed the build of a BH-3 and am trying to upload the Phoenix code from github.com/Lynxmotion/3DOF-4DOF … o_CH3R_PS2 but I get this compiling error:

Using library SoftwareSerial at version 1.0 in folder: C:\Users\Rick\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\libraries\SoftwareSerial
exit status 1
Error compiling for board Arduino Duemilanove or Diecimila.

What gives?

Let me try this again as an attachment, sorry. I’ll send some pictures too so you can check my jumpers, etc



Error message.txt (12 KB)

Hey,

Concerning compilation errors, the best would be to check the following first:

]Make sure you are using the most up-to-date version of the Arduino IDE. The current version at the time of this post seems to be 1.8.5. You can obtain a copy of the setup for your OS of choice here. Install the up-to-date IDE./:m]
]Download a fresh copy of the code here (ZIP) and extract it to a folder. Make sure it is extracted properly and not simply opened as a virtual folder (Windows 8/10 typically do this if you simply double-click the .ZIP file, which does not work for compiling code)./:m]
]Open that new folder and the .INO inside. This should open your Arduino IDE. Change the settings to match the requirements and then go to the File > Preferences menu and check the box for verbose compilation./:m]
]Compile the project. If it still does not compile, please copy & paste the full verbose compilation log to a text editor, save it to a file and upload it to your reply./:m]Your second post (and its attachment) seems to be showing an upload issue, not a compilation issue. The issue you have is a timeout issue while trying to program the board using avrdude. This can be cause by many things, but typically it is caused by something prevent the connection between the TX/RX (pins 0/1 on the BotBoarduino) and the USB port.

For the upload issue, please go to the File > Preferences menu and check the box for verbose upload. Redo the compilation & upload process and copy & paste the result to another file and also upload this in your reply. If possible, do not have both compilation and upload verbose at the same time, since that just adds a lot of extra stuff when trying to look at one or the other.

Sincerely,

P.-S.: Since you are using a BotBoarduino & SSC-32U combo with the Phoenix code, please remember to change the baud rate of the SSC-32U to 38400. You can read more about this on page 34 of the SSC-32U manual.

Ok, thanks I’ll try this this weekend. Yeah the first thing I did was update Arduino IDE to 1.8.5. My second post and attachment might be after I clicked upload by mistake because I haven’t gotten past verify/compile, sorry. I did want to ask you if my connection between the Botboarduino and SSC-32U is correct. I followed the diagram on page 23 of the SSC-32U user guide but should I instead connect to the Botboarduino’s 0,1 pins (TX,RX)? And I will change the baud rate of the SSC-32U to 38400, thanks I didn’t know I had to do that.

OK, let us know how it goes!

As for connections, the hardware UART pins (TX & RX, pins 0/1) are actually tied to the USB port, so they cannot be used without losing that connectivity (useful for debugging, for example).

The Phoenix code instead uses pins 12 & 13 for a software serial connection instead. Please use the proper pins set in the Phoenix code. When the BotBoarduino sends commands to the SSC-32U, you will see LED A or B blink in response. Green means a proper frame is received, red means it is wrong (typically wrong baud rate). If nothing blinks, then the BotBoarduino is not sending anything or maybe the wires are inverted.

Sincerely,

Ok, I did as you suggested and the code compiled and uploaded no problem. When I power up all I get is one beep and no response from the servos (other than the servos going to center position) and my ps2 controller won’t connect to the receiver (I tried to connect a different controller, wouldn’t connect either). The green light is solid on on the ps2 receiver. Reversed the DAT, CMD, ATT wires as suggested on the forum but still no connection. I followed the Readme in the code and deleted the ps2x library and replaced it with the Bill Porter version, still no connection. Calibrated the servos with Lynxterm, no problems there. Checked voltage of the battery with a multimeter, showing 6 volts. Changed Baud rate with button on SSC-32U to 38400 (showed red led), the green led A is on when powered up so it should be communicating with the Botboarduino. Tried defining BINARYMODE in Hex_cfg.h as suggested on the forum, no result. I tried everything I could find on the forum so I’m at a standstill. Took some pictures to show the current connections and jumpers, etc. Ideas?






Hi,

Here are answers to your comments/questions:

Good to hear!

We assumed that what is meant by “no response from the servos” is that after starting the robot (and the PS2 receiver being solid green), you pressed START on the controller and nothing happen? If so, please check that the LED at the back of the controller (near shoulder/trigger buttons) is also reporting connection.

In the current code on the GitHub repository, the pins for DAT/CMD/ATT are 8/7/6 on the BotBoarduino as seen here.

We assume you mean the one found here (the Lynxmotion version)?

Good!

If you are using a NiMH battery pack, you should have a voltage somewhat above 6 V DC when fully charged. Did you check the voltage of the battery without any load (i.e.: the robot powered off?). Maybe connect to the SSC-32U directly, place all servomotors to 1500 (easy to do in Lynxterm, use the bottom right button) and then measure the voltage of the battery input.

Seem good, yes.

There should be no modifications to make to any of the code to run a default setup (all modifications would be for previous versions of the code or modified/custom setups).

All your connections and jumpers seem good at a first glance (as long as you leave EXT for power selection on the BotBoarduino, of course).

You may also want to try the following, to ensure the BotBoarduino is able to connect to the SSC-32U properly:

  1. Place the center of the robot on an elevated surface so the legs do not touch any surface.
  2. Connect the USB cable to the robot’s BotBoarduino.
  3. Start Lynxterm and connect to the USB port at a baud rate of 57600 (this is the debug port for the Phoenix code).
  4. Power on the robot as normal. Some information should come up on the Lynxterm black text box.
  5. Enter SSC-32 forwarder mode.
  6. Try and control individual joints using the Lynxterm sliders. Let us know how that goes.

Sincerely,

Hi,
While the green light on the receiver is solid green, the red and green leds on the back of the controller are flashing on and off even after pressing the START button on the controller. My guess is that’s the root of the problem, the robot is not receiving commands from the controller. One thing I didn’t try is using the receiver off of my rover to see if maybe there is a problem with the receiver that’s currently on the robot?
Yes I used the ps2x library version you specified.
I’m using a 6v 2800 mAh NiMH battery and the voltage was actually 6.1v and I checked only at the battery’s terminals.
I’ll try the other things you suggest soon but I think the first thing to try is hook up a different ps2 receiver. What do you think?

Thank you for the details.

You can certainly try a different PS2 receiver. If you do, we recommend that you change your PS2X library for the official one from Bill Porter. Though the Lynxmotion version may work, it does have different timings specifically for our controllersé

Sincerely,

Actually the other receiver I’m going to try is a Lynxmotion receiver also. I’ll let you know how it goes!

Good news! I switched the ps2 receiver with another receiver I had and it worked (see video). Why I didn’t think of that in the first place is beyond me. Excellent robot!! I hope to make some additions and experimentation in the future. Thanks for helping me out again!

youtu.be/w0XAivtfdhI

P.S Could you possibly send me a replacement receiver?

Hey,

Glad to hear it is working! Also, nice video! :slight_smile:

As for the replacement, of course we can replace a defective product. Please open a support ticket here. Make sure to choose “Exchanges / Returns” for the fastest response time.
In your message, please provide the following:

]Your order or invoice number/:m]
]Details about your defective product (in your case, it would normally be a RB-Kee-05 replacement for your RB-Lyn-899 kit that you purchased)/:m]
]A link to this topic for context/:m]
]You can also confirm your shipping address in your first message to remove a extra communication, since this will be required anyway/:m]

We hope this helps and good luck with the project!

Sincerely,

Hey,

I’ve been thinking about options for controlling a few additional peripherals (pan and tilt, a gripper etc) that I may add to the current Botboarduino set up. Since just about all of the buttons/joysticks on the ps2 controller are assigned functions (I don’t necessarily want to change any of them) is it possible to add code to allow the Mode button to be used to change the functions of some of the buttons/joysticks to control other things? The Phoenix code takes up a lot of room so I don’t know if additional code like this would “fit” on the Botboarduino so perhaps this would be better suited for a Raspberrypi configuration as you suggested if I wanted to add a complete robotic arm. Enlighten me please!

Thanks!

Thanks!

Hey,

Many options are possible here.

One of the best one (and the Phoenix code already supports anyway) is to use an Arduino Mega 2560. It has far more FLASH and RAM which should make it possible to add more code and processing without moving to a Raspberry Pi.

As for the mode button, as far as I know, it only changes the way the controller reports its axes to the master. Therefore, the pressing of the mode button would most likely do nothing. There might be more to it, but you’ll have search/to read on that online.

As for buttons, I’m sure you can find one or two functions you do not really need for your purposes and use those for “mode switching”, maybe from hexapod control to arm control? There is most likely no need to control the hexapod while moving and arm. Alternatively, you could simply add more control buttons/interface and have one just for the arm. You can get some interesting robots where you have more than one operator or where you use both hands, all fingers and feet, too! :slight_smile:

As for controlling the arm, there are many ways around it. Most arms (ex: Lynxmotion AL5) only need a few RC-like channels (4-5), so you could simply use the remaining channels on the SSC-32U.
Alternatively, you can use a separate SSC-32U or other controller just for the arm, maybe even using its own independent power source.

We did convert our Arduino code for the AL5 control into a Raspberry Pi version, so you can certainly check that out here.

Since you do not seem to sure of what you need, this would most likely mean you are also still not too sure of what you want (i.e.: requirements). Therefore, I recommend you spend some more time on figuring out specific goals (what the robot needs to do) and from there you can identify each challenges and find solutions for them.

We hope this helps!

Sincerely,

Thanks for the great info! Yeah, I’m not sure what direction I’m going to go yet but I’m thinking about just adding a pan and tilt and maybe a gripper to the front of the hexapod (not a full arm) for now. I thought about just using another controller/interface but that’s too easy LOL! We’ll see what happens, maybe I will go that route. That’s great how you converted arm code to Python, very cool. I’ll let you know what I concoct!

Hello again, hope you"re still there Mr Scharette. I got side tracked with drone projects for a while but recently decided to start a project with my Hexapod. I’m using a second ps2 controller to control a mandible and pan and tilt that I attached to the Hexapod and am having some issues that I was hoping you could help me with. After much reading, trying different things with the code, etc, I came to a dead end. I am using the latest version of the Arduino IDE, 1.8.8 (I did forget to delete the ps2 library before installing the new Arduino version, don’t know if that could be an issue).

First time on the forum since it got a update so hopefully things go well. Here is my code:MandibleHex.zip (1.7 KB)
Also a couple videos:


The biggest problem I’m having is with the Pan and Tilt. Hopefully the vids came thru so you can see that the Tilt is barely functioning at all and the pan is only partially functioning. The mandibles are jumping too as you can see. The ps2 library I’m using is the Lynxmotion version too, I believe. Thoughts?

1 Like