Monday, April 29, 2013


TENTH DOCTOR:  "Does it have to do that?"

So we're closing in on the first robot.  I had the guts of my old "Square Candies That Look 'Round" -- Arduino, micro servo, and a Sharp IR distance sensor -- and my intention was to work around the shape and look of the components and dress them up in some cool way.

The niece had different ideas.  She really wanted the robot to have a big, box-shaped head.  So after looking over the materials we had, and keeping in mind how lightweight that servo was, I had her put together a box from three-eights pieces of white expanded foam.  My usual method with this material is smooth it with wallboard compound and/or gesso, paint it up with thinned white glue, and spray paint.

But we've been doing robot in short sessions, and we just couldn't wait long enough for multiple coats to dry.  We gambled, did one light coat of glue, and I hit it with the spray.  Which bubbled up quite a bit but the thing survived and, actually, the effect is kind of cool.

Unfortunately even though it is light, it is large enough so torque is an issue.  So I needed to swap out the cardboard box with something heavier.  And that servo is running rough, so I'm also swapping out for a standard-size.  Which, I'm just this second thinking, might mean I need to go to a board with a separate power supply.

(If I had any money I'd pick up a metal-gear micro from Adafruit instead.  But I have a couple standards lying around, so that's what I'll use.  A bigger issue is the lack of resolution and the rather noisy output of the Sharp.  We're really asking it to do more than it can do here.)

Anyhow.  While I was tinkering with finding a nice box to put everything in, and trying to decide if I was going to leave a full Arduino or port the code to a cheaper stand-alone, I realized there was a simple way of setting it up so the niece could get her feet wet on programming.

Write the basic code on to an Arduino.  But add a serial read command that will put new values into key variables (like dwell time, seek speed, sensitivity, etc.)  And then write a Processing ap on the front end that spits changed values down the USB cable.

My programming skill isn't quite up to having the Processing sketch re-write the flash, so the idea would be to toy with the values, then go back into the Arduino IDE and hard-code them into the working software from there.  Keeping the software on the micro means the robot remains stand-alone, which I think is good.

Unfortunately, as seems always the way, I didn't think of this until after my free month was almost over, and I'm not sure when I'm going to fit in the time to do this.

No comments:

Post a Comment