Do Androids Dream of LEGO MINDSTORMS?

Discussion specific to the intelligent brick, sensors, motors, and more.
Post Reply
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Do Androids Dream of LEGO MINDSTORMS?

Post 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!
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
nxtreme
Posts: 246
Joined: 29 Sep 2010, 03:53
Location: 192.168.1.2

Re: Do Androids Dream of LEGO MINDSTORMS?

Post 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... :)
One King to rule them all, One King to find them,
One King to bring them all and in the darkness bind them
On Earth where Shadows lie.
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: Do Androids Dream of LEGO MINDSTORMS?

Post by hassenplug »

I just updated my G1 with Cyanogen, and am able to load this app. Yeah!

Tonight, I can try it.

Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
mpscholz
Posts: 17
Joined: 29 Sep 2010, 09:32

Re: Do Androids Dream of LEGO MINDSTORMS?

Post 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?
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Do Androids Dream of LEGO MINDSTORMS?

Post 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
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
mpscholz
Posts: 17
Joined: 29 Sep 2010, 09:32

Re: Do Androids Dream of LEGO MINDSTORMS?

Post 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.
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Do Androids Dream of LEGO MINDSTORMS?

Post 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
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
mpscholz
Posts: 17
Joined: 29 Sep 2010, 09:32

Re: Do Androids Dream of LEGO MINDSTORMS?

Post 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!
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 2 guests