The following was recently posted in the
news section of the
Mindstorms website:
Below is a story from Lasse Nørfeldt, a young biology researcher from Copenhagen, Denmark, explaining about his experience with creating apps for LEGO MINDSTORMS.
I recently published an app on the Android Market called Build Controller . It's an app that allows you to turn on and off the different parts that the LEGO MINDSTORMS NXT has to offer. I made the app with App Inventor which is a Google project that tries to make it easy and intuitive to make apps. My time spent on making an app that could use the LEGO MINDSTORMS NXT in a new and different way has been very fun and educational, so I would like to share my experience and I hope that it will inspire people to make some awesome LEGO MINDSTORMS NXT apps for Android devices.
Lets start from the beginning. I had absolutely no experience with programming but had for a long time wanted to learn how to code so I could build my own apps. I then bought a JAVA book, but never really got into it, because the learning curve was too steep.
Then the launch of App Inventor came and I was really excited because this was so close to what I wanted. It's a very intuitive way to build programs that requires zero code writing, instead you work with blocks. These blocks contain code that when pieced together functions exactly like a program written in a normal fashion. I played around with it for a while and discovered its power but also limitations.
Then came the upgrade that supported LEGO MINDSTORMS NXT. I had never heard about LEGO MINDSTORMS NXT before and checked it out straight away. It quickly became clear to me that this was a product that made it easy to do hardware programming for a wide range of different uses. This was absolutely awesome! I had for a while wanted to build small gadgets that I could control with my phone.
I had earlier looked at the Arduino project but here again the learning curve was very steep [needs skills in electric circuits and programming - something I don't posses, yet ;-) ].
The NXT then seemed like the right solution to me and I quickly got a hold of a set.
Just before Christmas I got my NXT and started out building the get-started vehicle that can shoot out colored balls. Downloaded the official app from LEGO and played around with it for a while. It worked great and was a lot of fun. I then decided to build some small gadgets that I could control with my own app. It quickly became clear to me that it would be better the other way around - first building an app that then could help me in my building process. I started off building a simple app that could turn the different parts on and off.
Connecting via bluetooth is the hardest part but is needed to get the whole thing started. The app inventor forum site is full of talented friendly coders though, so when I had issues I got help there really quick.
In this case, a user by the name of ShivalWolf had written a guide on how-to set up bluetooth connection and I just used his work. Getting input and output from the sensors went smooth and it was an amazing experience to see my program actually make my LEGO motors come to life.
Setting up the functions was a lot easier than I expected but the whole thing quickly got messy on the phones screen. Making a pretty user interface (UI) with app inventor is where you especially become aware of App Inventors limitations. You have to work in a window called Designer and each time you make a change to the app, it updates and you lose the Bluetooth connection. This means that you build all the functionality first (and make sure it works) THEN you make a pretty UI.
How long time did it take? I used about 4 evenings setting up the system and about the same for setting up the UI. I published my app to the Android Market sometime in January and was surprised to see how many downloads it got (there have been 2,200 downloads in 10 weeks). The app was not complete and missed the Ultrasound Sensor function. I updated it later so it supported it and looked at my statistics. There seemed to be some problems with Android version below 2.1. First I thought it was the Bluetooth that was causing trouble (which might as well also be the case for some). I made a change so it could only be installed on phones with Android 2.1 and above. This presented some issues with the UI and I removed the restriction.
So unfortunately some people will download it without any luck, while others will find it useful.
What was the hardest part? I think the hardest part was actually finding the time to make the app, as soon as I found the time, it only took me a day to complete it.
What's next? I have some projects involving some DIYBio (Do-It-Yourself Biology) projects at a place called BiologiGaragen . I want to build some machines that allow you to make fun science experiments at home.
Sincerely,
Lasse Nørfeldt, B.Sc.Pharm."
No comments:
Post a Comment
Your comment will be moderated as soon as possible. Thank you!