Controlling Lego Mindstorm Nxt With Google Android Powered By Smartphone Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

This paper introduces how to control LEGO Mindstorm NXT with Google Android powered by smartphone to solve a Rubik's cube. It starts with the motivation to choose the Android platform since it is based on Java language and most of students CS USM (Computer Sciences University Sains Malaysia) have learnt Java languages before; and motivated by LEGO Mindstorm NXT abilities for robotic in Artificial Intelligence.

This paper describes and introduces about LEGO Mindstorm NXT controlled by smartphone with Google Android to solve a Rubik's cube. LEGO Mindstorm NXT is a robotic kit came with NXT  programmable brick, variety sensors and motors that was released by LEGO Group in late July 2006[ ]. NXT brick is a microprocessor circuit that can be programmed using computer. Users with Bluetooth-enabled computer hardware can transfer their programs to the NXT wirelessly to connect their computer to the NXT for program transfer. The inclusion of Bluetooth technology also extends possibilities for controlling robots remotely, for example, from an iPhone[ ]

In many real-world domains, robotics had take part in our daily life especially in manufacturing industrial and education sector. Robotics as referred to the McKerrow(1986), had describes the robot is a machines that can be programmed to do the variety tasks base on command that have programmed by human. Many advantages that robot can do for human such as in the risky task and complicated task that human cannot do.

Perhaps the most dramatic changes in future robots will arise from their increasing ability to reason. The field of artificial intelligence is moving rapidly from university laboratories to practical application in industry, and machines are being developed that can perform cognitive tasks, such as strategic planning and learning from experience.

Related work

Lego Mindstrom NXT with Device

Nowadays, technology can be defined as science applied to practical purposes. When the rapidly of development and research is so impressive, it is easy to think about the advantages of new technology. Lego Mindstorm NXT, being versatile and yet inexpensive Robotic Invention System (RIS), has proven to be a useful kit for study of robotics as well as other science and technology subject matters. Previous works have recorded success in the use of LEGO Mindstorm NXT as learning tools in education [6][7][8][9][10].

J.Goncales et al. [8] stated that Lego Mindstorm NXT is a powerful education tool and being used by authors in many activities. Therefore, it can use as modeling of a realistic simulation in order to validate the presented approach a real robot. The simulation will used to compare through a challenge the real robot. Since the Lego Mindstrom NXT are not expensive compare to the real robot. The author makes good choices using Lego Mindstorm NXT as modeling of a simulation than using a real robot. Using a real robot as learning tools it would cause a lot of money compared than using a Lego Mindstorm NXT. Since it still can do function, motion and need programming like a real robot. In the other hand, cost for one real robot maybe an equal ten robot Lego Mindstrom NXT. However, using a Lego Mindstrom NXT as simulation for real robot cannot meet a real requirement for real robot. For example the difference between real robots with Lego Mindstorm NXT is size, speed and strength. The author need to do a calculate ratio between real robot and Lego Mindstrom NXT first before used it for realistic simulation.

Taking the advantage of fast advancing and the rapidly growing technology, Lego Mindstorm NXT also was upgrade. In old days, Lego Mindstorms NXT was controlled manually by human and does not intelligence in many ways. But today, Lego Mindstorm NXT was adding a sensors and device such as sensors of touch, ultrasonic, light, sound and device like Bluetooth to extend it function and the intelligence [11][13]. Not forget to say that Lego Mindstorm NXT also can be control by using smart phone powered by Android [12]. However, this strategy can only be effective if the performance of the sensors meet the requirements of the robot application.  In particular, in many systems, it is crucial for the sensors to provide reliable updates on its value to the robot system.

Android for Smart Phone

Google Android is a software stack for mobile devices that includes an operating system, middleware, and key applications. One of its features that make it flexible is having an SDK that enable user to make endless imagination come true [12]. The problem that faces most developers nowadays is having the tools to develop applications for mobile platforms. Some mobile platforms may have the potential to be integrated with other hardware but without the tools and the flexibilities, programmers may have limitation with what they can develop especially in robotics programming. As describes by Sharon P.Hall and Eric Anderson [15], Android has the potential to solve major causes of dissatisfaction that users have with their phones.

Difference between android with others os

Android OS

Symbian OS

Palm OS

iPhone OS

Open source

Open source

Similar Android

Elegant OS

Language :Java

Language: J2ME and C++

Language: HTML, CSS and JavaScript

Language : Objective C, a super-set of C and C++

Integrated with Google cloud services

Platform : S60

Framework : Dojo

Based on Mac OS X (which is based on freeBSD).

More than mobile OS

Its multi-touch gesture based navigation system.

Controlling Lego Mindstrom NXT with Android powered by smartphone to solve Rubik's cube

Android OS move first step ahead compared others OS when they announce to publish application than connect Android smart phone with Lego Mindstroms NXT [13]. MINDdroid application will allow to Android smart phone user to get instant access and control Lego Mindstroms NXT and give the ability to control by flick of a wrist [13]. The MINDdroid app is a remote-control application that allows creating a wireless connection via Bluetooth connection directly with Lego Mindstorm NXT. With combination Lego Mindstorm NXT with device and Android smart phone, it also can used to solve Rubik's cube [16][17][18]. However, there still no documentation was publishing related to this. But it is already proved when LEGO make competition to solve Rubik's cube using Android smart phone and Lego Mindstroms NXT [13].


This section gives motivation of extending Android capabilities to control Lego Mindstorm NXT. Due to its portability and performance that can outrun traditional computing today, it is possible in the future that everything in the world can be controlled by a mobile device. Under this situation, we believe that it all started with Google Android.


Since the release of Google Android, a Linux based operating system for mobile platform; there have been a numbers of projects regarding Google Android, Lego Mindstorm NXT and how to extend its usage. Since Google have provided the SDK for the developers, more features can be manipulated and further enhanced its capabilities. This is important as it will encourage developers especially among student to develop interesting application and further integrate it with existing device in the market today.


The idea behind this is to give Google Android the ability to control the Lego Mindstorm NXT and perform the steps to solve a problem. In this case we are using Rubik Cube as a problem to be solved. We start by creating a connection between Lego Mindstorm NXT and Google Android. It has been done before by Brown and Holzl[1] where they manage to establish a Bluetooth connection between both devices.

The next step is to acquire the current position of the cube. There are 2 methods that can be use; the first one is manually entered by user while the other method is acquired through built in camera in the Google Android smartphone. We prefer the second methods as it will be more accurate as done by David Gilday [2]. The data is then generated in 3 dimensions (3D) and displayed to user. Then, user must place the cube accordingly in the Lego Mindstorm NXT so that it can hold it properly during the movement. The movement is acquired through the touch screen of the device and sent via Bluetooth to the NXT brick.

Lastly the arms of the Lego Mindstorm NXT will move the cube into the desired position based on movement made by user in the Google Android. This step will revolve until the cube is solved. The outcome from this is to enable mobile remote controlling into large devices; in this case we use Lego Mindstorm NXT to manipulate the rubik's cube. This will eventually reduce the usage of man power in a dangerous situation. The usage of mobile device such as Google Android powered smartphone will provides portability and connectivity to the user.


The authors would like to thanks the reviewers, lecturers, supervisor and other individuals who directly or indirectly contributed in this research. Thank you for all the support and knowledge for this time being.


The authors would like to thanks the reviewers, lecturers, supervisor and other individuals who directly or indirectly contributed in this research. Thank you for all the support and knowledge for this time being.