Sunday, 2 December 2012

More work on the robot arm

Today, I implemented arm locking. It's like file locking, but for arms. I'll explain.

Obviously I can't have two people trying to use the robot arm at once. One will move it up while the other moves it sideways, and so on, it'll be a mess, and no-one will get anywhere.

So I've made it so that only one person at a time can use it. Each time you make a move, a file stores
the time, and your computer's IP address. And each time you make a move, it checks to see; if it's been five minutes since the last move, then anyone can use it. But if it's less than five minutes, only the person who last moved it, can make a move.

I also changed the view-from-above. Previously, I taped the cam upside down on the shelf above the arm, and used software to invert the picture, which would have been upside-down. I've changed it; the cam is now suspended the right way up, so I don't need to invert the picture.

I've also created a kibitzer's page, so that people can look but not control the arm.

And the web server logs grow *very* fast. There's limited space on the SD card that the Pi uses, so I've used space on a disk on another computer for the logs. That is a slightly flaky thing to so, because if the other computer is down, even temporarily, the files aren't accessible. But for web logs, which i won't usually read, but will just delete, it's fine.

I think I'm nearly ready for it to go public.


  1. I've tried using the arm, but it doesn't seem to be working. The 3 pictures are static. Is something broken?

    - Lifechooser

  2. Thanks for telling me - I've fixed it, I think.

    It's always better to contact me by email; I might not read these comments every day.