iPhone-powered robot using the ability of a light sensor to read contrasting colors

Jun 4, 2008 10:42 GMT  ·  By

Is there anything they can't think of using the iPhone for? The guys at BattleBricks have crafted out a simple Lego robot that can hold an iPhone and read the on-screen activity - remotely manipulated by you - to coordinate its moves. How cool is that?!

According to the makers, it's the ability of the Mindstorms NXT light sensor to read the contrasting colors on the iPhone display that made this possible. The iPhone to Lego NXT Robot communicates via Apple's Safari web browser and the Lego's Light Sensor. The best thing about it, though, is that you can make one yourself!

"To build this, you'll need a laptop, two iPhones, and a Lego NXT Robotics Kit. First, build your robot. Second write some Java LeJOS Robot code," BattleBricks explains. The third step is to write some Google Web Toolkit web application code. The LeJOS source is available right here.

Fourth, you will need to plug in your iPhone into the robot, and use either a browser or another iPhone to drive the Lego Robot, since it determines in which direction to move based on the color value from the light sensor.

The developer has made this very simple Google Web Toolkit client server app that helps you adjust the color of the iPhone display to trigger the Lego NXT light sensor. It has two modes - "The first is the mode the robot uses, which changes to different shades of grey depending on the other client, which has a simple control screen. The server simply receives messages from the control client and sends them to the iphone client," the developer explains.

Once you've got the LeJOS NXJ app uploaded to the NXT Robot, and have the Google Web Toolkit webapp running on your laptop, all you need to do is visit the website with the Robot's iPhone and select "Robot." The iPhone's Auto Lock setting is "Never" by default, while the Brightness has been set for the most contrast in color changes.

Go ahead and watch the iPhone Lego NXT Mindstorms Robot Demo, or? why not make your own?

Photo Gallery (2 Images)

The iPhone Lego NXT Robot
Building the lego robot
Open gallery