Monday, 7 November 2011
Hardware meets apps
Ok, so the Lego Mindstorms NXT robot kit I got last week is an awesome plaything, but it also packs some cool features, namely Bluetooth support. This opens it up to being controlled by (or controlling) all sorts of things, including PC's, tablets, phones and iPods.
In this demonstration I built the shooter bot (one of the several robot variations that are in the kit instructions) and have controlled it with my android phone, with an app built in App Inventor (see previous post about that).
I have to admit, the blocks (code) that I used in app inventor were not all my work. I gave it a shot, but even with a nice graphical block interface, there are some complicated processes you need to go through to make this work, like the Bluetooth connectivity, and the control statements to command the motors. So I got a headstart using sample code from The AI Repository, a folder of pre-built programs you can load straight into App Inventor.
I made some changes, added some extra buttons, arranged them into a directional layout and put in an "Action" button, for any functionality the front motor has.
Anyway, here's a little video of it working below, it's shooting stuff and spinning around. While Your watching it, chill out to some dub reggae in the background.