Monday 26 November 2012

Working on the robot arm

I decided to add another webcam, this one giving the view from above. So I've put a webcam upside down, sellotaped to the underside of the shelf above the arm. This, of course, means that the picture is upside down. No problem.

apt-get install imagemagick

That gives you a command line group of programs to do any image manipulation I can think it; inverting an image is easy. But it only partially installed. never mind; apt-get update, followed by apt-get install imagemagick did it. and then the image inversion is done by

mogrify  -rotate 180  -format jpg -quality 80 temp3.jpeg

And then some small mods to the page that displays the pictures, so I can get all three on.

I also noticed that the Creative cams were a *lot* more stable than the W300A cams. The images are captures better, and the images don't break up. I don't know if it's the cam itself, or the software, but I kind of don't care. I replaced the W300s with Creatives (I had a few in a box, left over from another project).

It really is good having loads of bits and bobs lying around!

I also did a bit of research following something I was talking about at the Raspberry Jam. I had a look, and it is possible to turn a Pi into a wifi hotspot. I've ordered a couple of insanely cheap wifi USB dongles, and when the rest of the pies arrive, I'll try that. Under £5 each, including postage. Cheap as chips.

But, some bad news. When I tried changing the power cable for the stepper motors to something that I thought wuold be more stable, there was blue smoke coming out of the motor that rotates the whole arm. And, sure enough ... it's blown. Bah. I'll have to replace it.

   ..... later ...

OK, I replaced it. But the replacement suffered from severe judder, so I replaced that, and now it all seems to be OK. I've ordered three more stepper motors; I'm guessing that I might have to do more replacing in future. So this time, I've got servos that are more powerful and durable, I hope.

The Pi seems to be happy with all this. It's now running three webcams and the Maestro servo controller off its USB, using an unpowered hub, so all four devices are taking their power from the Pi, without (I think) problems.

No comments:

Post a Comment