Page 1 of 1

Do Androids Dream of LEGO MINDSTORMS?

Posted: 11 Oct 2010, 18:21
by mightor
From the Mindstorms News bulletin:
Now there is a new way to play with your MINDSTORMS robots!

If you are the owner of a LEGO MINDSTORMS NXT set and have an Android smartphone and you want to have some quick and fun action with your robots, now you have the possibility to get some fun and easy play - for free!

We are happy to announce the launch of the MINDdroid application for Android (2.1 or higher) phones, that will allow you to get instant access and control to your NXT robot, and give the ability to control by the flick of a wrist!

The MINDdroid app is a remote-control application that allows you to create a wireless connection directly with your NXT, and once a connection is established, you can tilt and turn your phone to make the robot move forward, turn to the sides, and by pressing an action button on the phone's screen, activate the Action motor. If you have a Shooterbot or other robot using two motors for motion and have a spare motor for actions, you are in for a lot of fun!
For more info on how to download this app, go here: [LINK].

It's a lot of fun!

Re: Do Androids Dream of LEGO MINDSTORMS?

Posted: 12 Oct 2010, 03:35
by nxtreme
Hmm, I wonder if the new "Froyo Five" Archos tablets will/do support this app. I've been thinking of getting one, this might be the final shove I need... They should support it, right? They all have Bluetooth 2.1 EDR and with a little bit of hacking you can get the whole Android marketplace on them. Thanks for the heads up Xander.

Oh and I believe the answer to the question "Do Androids Dream of LEGO Mindstorms" is yes. Android has the brain, Mindstorms has the brawn. They go perfectly together... :)

Re: Do Androids Dream of LEGO MINDSTORMS?

Posted: 12 Oct 2010, 14:28
by hassenplug
I just updated my G1 with Cyanogen, and am able to load this app. Yeah!

Tonight, I can try it.

Steve

Re: Do Androids Dream of LEGO MINDSTORMS?

Posted: 31 Oct 2010, 11:37
by mpscholz
I just got my HTC Desire mobile and instantly tried out MINDdroids.
But, sad to say, without success so far. :(
MINDdroid can pair to the NXT brick (running official firmware, version 1.28), but once I try to connect, it states

"Bluetooth error
Oops! It seems that your robot is not switched on [...]"

Yet, the brick is switched on, Bluetooth is activated and visible.

So what am I doing wrong?
Anyone encountered that also?

Re: Do Androids Dream of LEGO MINDSTORMS?

Posted: 31 Oct 2010, 13:37
by afanofosc
This error occurs when the sendMessage function throws an IOException. I assume it is coming out of the nxtDos class.

Code: Select all

	private boolean sendMessage(byte[] message) {
		if (nxtDos == null) {
			return false;
		}

		try {
			// send message length
			int messageLength = message.length;
			nxtDos.writeByte(messageLength);
			nxtDos.writeByte(messageLength >> 8);
			nxtDos.write(message, 0, message.length);
			nxtDos.flush();
			return true;
		} catch (IOException ioe) {
[b]            sendState(STATE_SENDERROR);
[/b]			return false;
		}
John Hansen

Re: Do Androids Dream of LEGO MINDSTORMS?

Posted: 31 Oct 2010, 15:21
by mpscholz
Thanks John.
Simply being an "end user" for the moment (without having set up some Android development /debugging environment for now), I wonder whether there's any possibility to view some kind of log information on the Android phone to get insight into the detailed nature of the IOException.

Re: Do Androids Dream of LEGO MINDSTORMS?

Posted: 31 Oct 2010, 19:25
by afanofosc
I don't know much about Android development and am not the world's greatest Java expert, but you can use the Log class in android.util.Log to output messages to a standard Android log file. I would add

Code: Select all

		Log.e("BTCommunicator", "sendMessage threw an IOException:", ioe);
to the catch block before the call to sendState.

Does the NXT show your phone as a known device on connection zero?

John Hansen

Re: Do Androids Dream of LEGO MINDSTORMS?

Posted: 31 Oct 2010, 19:55
by mpscholz
John,

I notice that I didn't make myself clear enough: I am using that as any "normal" user would do, just downloaded it to my Android phone and ran it against a simple two-wheeled robot.
So no development mode or manipulating source code - that will follow soon...

Actually, I got it working only minutes ago. Don't know what I changed exactly (more in the style of rebooting the phone, the app, Bluetooth, the NXT, whatever), but now it works like a charm. :)

Ah, the golden times that lie ahead!