Ultrasonic "eyes" help please.

I have found the code to get range information from the Ultrasonic sensor head but am not clear where is should go? It seems it could go in ServotorComm, Robot, GUI, and there are more options I probably haven’t found yet!

I am not a software engineer, I did some basic at home and C++ at college and 8748 assembly language so I am not totally ignorant but this Python spread about the different modules all looks very confusing to me.

All I wanted to do initially was to be able to look left or right and get a range return from the “eyes”. I did wonder if the code could be put into a “Move” but can’t seem to get that to work (shame as it seemed a pragmatic way to run little sub routines)

Ultimately I would like to use the ultrasonic sensor as an auto STOP button. So I was planning to add it to moves like walking, turning left and right (for which it would angle left or right to “look into the turn”) and ping repeatedly throughout the move, I planned to straighten it on exiting the move). I was then going to set a safe distance variable, compare the returns and if the “force field” was breached I wanted it to kill all servos or at least freeze everyhting.

This might be possible if I had Servotor32 2.1 because it adds the U command and a number of repeats which could probably be used in a Move.

Other than that i am close to giving up as it is all to daunting to self teach/learn.

Hi Slartibartfast,

Ultrasonic readings are not yet a part of PoMoCo. They’re only for Arduino coding at this point in time.

So that means the code on the “getting started”/Ultrasonic webpage needs to get added (in the correct place) to the Servotor32 firmware loaded onto the board, right?

I have seen some v2.1 code mentioned which implements the key to ping and get a response from the ultrasonic sensor, but can’t see it in the firmware list. Is that because it isn’t tested/released or is that the wrong place to look.

If that is the code I need, how easy is it to get it onto my Servotor32 board (which is v2.0) and is there a risk of messing it up and “bricking” it? A link to any recommended threads that spell out the firmware upgrade process would be much appreciated.

Alternatively, are there any plans to add Ultrasonic functionality to PoMoCo so that Arduino/programming dummies like me can still enjoy Hexy albeit in a limited way?

Lastly, can I call moves from within other moves in PoMoCo? If so, how/what is the syntax?

Thanks.

Hi! I have problems with Hexy’s movements. The fact is that servos are working perfectly fine when turned on separately. Even a separate leg is working perfectly fine (e.g. wave command). However, when I turn on all the servos, something weird happens and they start moving very weird. E.g., if I give a command set zero or get up, the legs just twitch and curl.

This is a result of low battery charge. For best results, use fresh high-capacity NiMH and follow our powering Hexy guide:
arcbotics.com/products/hexy/powering-hexy/