While I was getting confused on what to code on the quarterly hack day, our senior manager brought a Lego Mindstorm NXT programmable robotics kit for some fun. The moment I saw his mail, I ran to his cube to grab it. This was my one chance to enjoy some building and coding fun together in the name of hack.
So I spent the whole Saturday figuring what to make, and suddenly this idea struck me. In this age of social networking mania on the web, why not make an intelligent picture taker which can roam among people in a room and take some cool shots.
This is by far the best toy I ever handled. I always wanted to make toys with servo motors, and the kit has 3 of them. So 2 of them went to the wheel and the last one became a concoction to trip the shutter. Give the right amout of power and it will press just like a human finger. Woot.
Other than the motors, there are 4 sensors – ultrasonic (to “see” like bats), sound (mic), touch and light. Am having a ball of time to develop code in NXC on my Mac. A major part of the fun is in multithreaded event programming, using mutex and semaphores. Downloaded a very convenient compiler from Bricxcc and it is a breeze to compile and send the binary program to the robot over bluetooth. Here are the commands:
$ nbc prog.nxc -O=prog.rxe $ nxtcom -v -S=/dev/tty.NXT-DevB-1 prog.rxe
To generate the tty for the bluetooth, I followed the instructions here:
http://juju.org/articles/2006/10/22/bluetooth-serial-port-to-nxt-in-osx
I am targetting to have these features for demo on Monday:
1. Front bumper hits something => move back a bit and take a picture.
2. Some obstacle comes in front and stays there for a few seconds => take a picture.
3. Explore the room intelligently.
More photos here.


#1 by Andre on April 23, 2008 - 1:19 am
Joy,
As always, intuitive and awesome stuff!
#2 by Lig on May 16, 2008 - 5:05 pm
Neat stuff. Me likey !
#3 by Richard on July 8, 2011 - 10:05 pm
That’s really cool. I think you should try to sell the prototype to Google. Maybe they could replace their Street View camera cars with a fleet of these!
#4 by Jamey on December 8, 2011 - 9:51 pm
If only I could learn how to enjoy programming I could get way better at it… Maybe one day i’ll make something as cool as this. Awesome usage of Lego dude.