Well, this was my plan – to create an extremely simple virtual piano with Lego Mindstorms, just by using the ultrasonic sensor in the manner below:
To play the correct frequency for the detected key, I first tried a ladder if-then-else within the Mindstorms visual programming environment, and it absolutely tanked! For every if-then-else path, it was doubling the height and before I reached 5 such paths, the exponential growth of vertical screen height made it pathetically slow and unbelievably difficult to scroll. So I ditched it, flashed LeJos on the brick and wrote a teeny meeny Java code which worked brilliantly! or so I thought…
It was playing tunes alright, but they were not the correct ones! After a couple of rounds of troubleshooting, I quickly realized it was not any programming error, but one that I totally ignored – the resolution of the sensor!! It turns out that the precision of the sensor is +/- 3 cms, and I had the bars at 2 cm widths.
So the moral of the story is – before trying out things with sensors, make sure to read the specifications thoroughly!
I wanted to create a robot that can draw something on a paper. Searching for some inspirations, I found on YouTube, a variety of very amazing and cool implementations. Yet, they all drew on a horizontal plane, and were mechanically complex. I wanted something that I could mount on my son’s easel, and draw like a painter. Being a complete mechanical noob and only 2 days of robotics experience behind me, I set out to design a very light contraption that would draw something interesting. During my research, I was heavily influenced by this non-lego robot. First I played with a few technic pieces to model the arms and then hooked it up to couple of servo motors. The result is what I call a PlotterBot!.
As you can see, it is very simple. Two motors drive a pantograph mechanism. A pen is taped to the tip of the pantograph.
Last weekend we walked into Fry’s to find an awesome deal for Lego Mindstorms NXT 2.0. Mindstorms is a robotics system for kids 10+ years, and it comes with 3 servo motors and 4 sensors (1 ultrasonic sensor, 1 color sensor and 2 touch sensors), and a wide variety of Lego technic pieces. I had always wanted to buy one for my son Kevin (and for me too, he he), so couldn’t pass up this deal!
Getting back home, Kevin and I immediately got to work, and he was able to build the shooter bot quite easily with little help from me on the programming side. Shooterbot is one of the examples that come with the NXT software.
Next couple of days, I was pretty much occupied with it and built a robot that would paint geometric patterns! Expect more details, pictures and videos in my next post!!
Recently I found that a WebGL program I wrote earlier was not working anymore due to CORS restriction. To get around this, I wrote up an extremely simple proxy using node.js and hosted it on the amazing nodester service.
You can access the service like this:
http://corsproxy.nodester.com/?src=<image url>
It just fetches the data from remote url and streams it back, after adding the following two headers:
I tested it on Aurora (Firefox 9.0a2) and it works fine with a modified Three.js sample. Note: Please use the nodester link for demonstration purposes only. Don’t use it in production!
Electronics used to be my hobby while I was growing up, and one of the components that always fascinated me was the seven segment display. So when I wanted to get my feet wet on YUI 3 couple of weeks ago, I thought how cool would it be to develop a widget that renders a seven segment display. To make things interesting, I decided to bring Raphaël in the mix, and thus was born the YUI 3 seven segment display widget! In this article, I’ll explain how I went about developing this widget.
Today, I casually went to see what’s new on jQuery mobile and was treated with a wonderful surprise. The alpha is released! I immediately fired up my stock browser on droid and tried it out. It is so beautiful and I can’t believe its not a native app!
It worked great when the device orientation changed, immediately re-laying out the components in a jiffy. The only cause for confusion seems to be the “Back” button, which seems to mirror the back functionality of the browser. When you fire up multiple dialogs on the sample page and try it out, you have to unwind to go back to the previous screen.
I’ve never been excited about typing text on my mobile, but a new technology called swype well might change that, and I bet is going to revolutionize the way we all input text on mobiles. Unlike tapping a series of softkeys, you enter text by “connecting” keys. You should check out the demo videos! When I first saw it, it was a “why didn’t anyone think of that before?” moment!
Character recognition has been around for a while, and I have used it on my Palm and iPaq devices previously, but this is a very smart idea. What would take like 6 to 7 strokes for a word using character recognition can be done on a single stroke with swype! This is a game changer. In computer science terms, it is like optimizing from O(n^2) to O(n)!
I was a bit disappointed to see they did not have one for droid, but taking hint from a tech video, I googled it and bingo! there was one unofficial pre-release available. So inspite of the “It might burn down your house or eat your dog” caveat, I downloaded and installed on my droid, and I’m in so love with it!
Now I wonder what will happen if these kids gets a hand on one of these!
I was trying to associate specific file type with PHP editor when I noticed some profane text in Eclipse! There is a content type called “s**t happens”, tied to .sql files. Can you believe it? See screenshot. I traced it to DBEdit plugin.
I like humor in code, but I am strongly against profanity, even in its mildest form. Please let us keep it professional!
Update: Initially I thought it was part of PDT distro, but thanks to Wayne, who pointed out it could not be, I verified that it was not by downloading and checking the plugins. I apologize for the error.
With your support for Let It Snow! application, we were able to raise USD 750 for Myrtle! This will go a long way in supporting the educational expenses of many underprivileged kids, and also raise HIV/AIDS awareness in rural Chennai. Thank you, thank you!
Also, the number of application downloads is 1042 as of today. Glad to have crossed the 1000 mark :)
Do you live near the Tropics and wish you had snow? or live in the Northern hemisphere and had enough of it? Don’t worry, this application will let you enjoy falling snow within the comforts of your home on your Android powered phone. Let it Snow! is a fun Android application for the Christmas holidays. It simulates falling snow over a winter landscape. There are three different landscapes available. It works in both portrait and landscape modes. You can also select a picture and have snow fall on your head or a friend’s!