Some questions about Hexy

Hi! Congratulations for your project!

I’ve some questions about the 250$ version of Hexy. The questions are:

  1. The hexapod is available in color black? I’ve seen this image.
  2. Hexy is Arduino compatbile, ok, to program it, can I use the standard Arduino IDE? What is the version of controller to use in the IDE (UNO, MEGA etc…)?
  3. In the future it will be possible to connect other sensors to Hexy (CMOS cam etc…)?

Thanks!

Hey Piero,

I think I can answer some of your questions;

  1. that color is Gray, IIRC. That’s the same color as the one that I bought
  2. the board is compatible with Arduino Leonardo - you can download the latest firmware, Servotor32, via Arduino 1.0+, so I can imagine that you can also add your custom logic on top(as long as you don’t remove any necessary code in Servotor32.
  3. There are some pins available, so I can imagine you can…although a CMOS cam sounds like it would be too much(I don’t know for sure!). Servotor32 1.3 is about 8KB compiled, so there’s ample room to expand on that, I believe.

Thank you for the response! :wink:

I’ve an other question. :blush:

The servo controller is 100% Arduino Leonardo compatible, ok, to control servo motors I can use the Servo.h library or there is a specific class?

Thanks!

We use custom code, so servo.h isn’t going to work. We are planning on implementing a servo.h like library, though. We should have a code update for servotor within the next week or so to allow for that.

Ok, where I can find examples of code use to program Hexy?
Thanks!

In the Hexy there are 3 basic components connected to the controller:

  • Ultrasound sensor
  • Bluetooth module
  • Servo motors

Now, servo motors will be controlled with your custom class, ok. Bluetooth module will be used with the Serial instruction. My question is, the ultrasound sensor has a custom code? I’ve made a robot with the Ping))) Parallax Sensor and I’ve used the code present in this page. The sensor on Hexy has the same code?

Thanks!

The arduino code on the github shows how to change the servos with the changeServo() function. 1500 is centered, 500 is max left, 2500 is max right. You can start writing custom code with that.

As far as the ultrasonic, you can get the library here: http://jaktek.com/wp-content/uploads/2011/12/Ultrasonic.zip

Here’s the test code we use to make sure its operating properly:

#include "Ultrasonic.h"

#define TRIGGER_PIN  17
#define ECHO_PIN     11

Ultrasonic ultrasonic(TRIGGER_PIN, ECHO_PIN);


void setup()
{
  Serial.begin(115200);
}


void loop()
{
  printDistanceCM();
  delay(200);
}

int printDistanceCM()
{
  float duration, cm; 
  digitalWrite(TRIGGER_PIN, LOW); 
  delayMicroseconds(2); 
  digitalWrite(TRIGGER_PIN, HIGH); 
  delayMicroseconds(10); 
  digitalWrite(TRIGGER_PIN, LOW); 
  duration = pulseIn(ECHO_PIN, HIGH,3000000); 
  cm = duration / 29.0 / 2.0;

  Serial.print("CM: ");
  Serial.println(cm);  
  return cm;
}

Thank you for the Ultrasound Library and the example!
I’ve searched the example of changeServo() function here but I don’t find it…
Can you give me the link for the Arduino code?
Thanks!

[quote=“E.Mk”]Hey Piero,

I think I can answer some of your questions;

  1. that color is Gray, IIRC. That’s the same color as the one that I bought
  2. the board is compatible with Arduino Leonardo - you can download the latest firmware, Servotor32, via Arduino 1.0+, so I can imagine that you can also add your custom logic on top(as long as you don’t remove any necessary code in Servotor32.
  3. There are some pins available, so I can imagine you can…although a CMOS cam sounds like it would be too much(I don’t know for sure!). Servotor32 1.3 is about 8KB compiled, so there’s ample room to expand on that, I believe.[/quote]

How to be sure if the cmos is too much?

[quote=“BurningTemplar”][quote=“E.Mk”]Hey Piero,

I think I can answer some of your questions;

  1. that color is Gray, IIRC. That’s the same color as the one that I bought
  2. the board is compatible with Arduino Leonardo - you can download the latest firmware, Servotor32, via Arduino 1.0+, so I can imagine that you can also add your custom logic on top(as long as you don’t remove any necessary code in Servotor32.
  3. There are some pins available, so I can imagine you can…although a CMOS cam sounds like it would be too much(I don’t know for sure!). Servotor32 1.3 is about 8KB compiled, so there’s ample room to expand on that, I believe.[/quote]

How to be sure if the cmos is too much?[/quote]

Keep in mind, I’m not an expert in this field… but from what I recall, if you want the arduino to control the camera (e.g. send signal to start/stop recording video, take picture) that is doable, but if you meant having the arduino receive the raw image and then process it(e.g. arduino to do edge detection/face recognition), you’ll need something with a lot more memory… maybe the Mega can handle it… but not sure about the lesser models.

I looked into doing this with an off the shelf serial port webcam(many, many years ago!) and the problem I faced was that the image I was getting from the webcam was too big for the MCU(low res grayscale was fine, though), and once I had it, the MCU took forever to process the image for face, complex patterns, etc.

But again, with projects with CMU Cam, maybe it has become easier?

Not sure what you wanted to do, if you wanted to simple control the camera, the MCU will suffice. If you envisioned something like, a vision processing robot, then you’ll need a lot more power… might wanna look into a Raspberry Pi or something(even though with a 700 mHz, 256/512MB RAM… I think it’ll be a challenge…)

some relevant places to look :

raspberrypi.org/phpBB3/viewt … 30&t=20681
raspberrypi.org/archives/1816

I guess the short answer is, I don’t know. I mean, it would help if you could describe what you want to do with the camera - perhaps someone more knowledgeable in that area can chime in.

Well my intention is to put a camera on the hexy that will send images with a certain frequence to my pc, the pc process them and send istructions to the hexy. I think the hexy doesn’t have enough power to make calculations in local so yes, I would use an external device. An android mounted on the Hexy would be nice!
p.s.: is the hexy aviable for buyng or it’s still a pre-order?

[quote=“BurningTemplar”]Well my intention is to put a camera on the hexy that will send images with a certain frequence to my pc, the pc process them and send istructions to the hexy. I think the hexy doesn’t have enough power to make calculations in local so yes, I would use an external device. An android mounted on the Hexy would be nice!
p.s.: is the hexy aviable for buyng or it’s still a pre-order?[/quote]

Oh yeah, that should be fine. A lot of us have similar plans and I’ve seen some robots follow this type of architecture! For example, I’ve seen people work with X10 pin cameras and a PC with a tv tuner to get video streams… then they had the power of PC(s) to process the images. Had nifty “control my bot from the internet pages and see the picture from the cam” type things going. Very nice.

If you are familiar with android/iOS programming, you can also consider mounting a cellphone into the Hexy… it’s got a camera and phones nowadays pack a > 1gHz in processing power. iOS might be tricky, I hear the serial port profile is locked down… but some people are finding workarounds around it.

anyway, good luck to your endeavor, and keep us posted… it sounds like an interesting application.

Anything image related, even sending it, would be a large task for the controller. For example, ad 320x240 8bit-color image would still be 74KB, whereas the controller is 2.5KB of ram with ~17KB of flash leftover. There also isn’t THAT much processing power left over when its controlling that many servos, on the firmware update I’m posting today its something like 25% free. Also, most microcontroller cameras work on SPI, which I use to do the servo controlling.

There’s a couple ways to go about this:
1.) Get a raspberry pi, have it all onboard. This sounds like something I’d want to play with
2.) Get a wireless camera, as E.Mk suggests. We’ve had good luck with these:
amazon.com/Wireless-Internet … ifi+camera

[quote=“Piero78”]Ok, where I can find examples of code use to program Hexy?
Thanks![/quote]

Newest code is always posted on the github:
github.com/ArcBotics/Servotor32 … Servotor32

Thank you for the link!
The TimerOne.h is the final version of the class that we have to use to program servos?

TimerOne.h is a library used to control the microcontroller timers. A good intro on microcontroller timers can be found here:
http://letsmakerobots.com/node/28278

We don’t have a cohesive servotor library yet, but its in the works. Hopefully by Christmas with our complete 2.0 update, but if nothing else we’ll at least release 1.6 by then.

Hi! At this time there is a complete ARDUINO library to control servos or it’s in work?

When I work with robot powered by Arduino technology, I write an interface with Visual C#. At this moment I know how to communicate with the robot (to the bluetooth), to use the ultrasonic sensor (with your library), but, at this time, I don’t understand EXACTLY how to work with servo motors… :unamused:

I can use PoMoCo software, ok, but I want to program Hexy with the Arduino IDE.

Thanks and excuse me for my continous questions!

Hello! Now is there a dedicated library to control servos?
Thanks.