Archive for April, 2008

Fun with Lego Mindstorm NXT

Saturday, April 19th, 2008

Picture taking robot

Picture taking mechanism

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.

Got my EOS 5D

Friday, April 18th, 2008

And I still have my D70 in the bag. Not that it is obsolete because I have been using it for 3 years, but my recent work has been pushing the image quality to the limits. I have been doing some decent amount of low-light work and the noise at high ISO (800-1600) is not tolerable any more.

I looked around for a true upgrade to a full frame body and Nikon only has it in its $5k D3. While an amazing camera with spotless images at ISO6400, it is certainly not affordable for me. The D300 felt just perfect in my hands, but it is still a crop sensor body. The 2 year old Canon EOS 5D has just what I need: full frame, high performance in low ISO, and a great kit lens, the 24-105/4 L IS USM, all for an attractive price from bhphoto.

Some say switching brands is expensive, because of the existing lenses. I have only two good nikkors, namely the 50/1.8 and 85/1.8 and they will stay for my fm3a anyway. For now, my bag looks perfectly sane, with the D70 as a backup body with 50 on it, while the 5D takes up the main job.

Some productive days ahead I guess.