MINDSTORM, NXT-G & ISADORA
-
I've started looking into this and not surprisingly I think there are a few ways to do it.
Are you using a mac or a pc. Someone has written a GlovePie script to control the nxt with a wiimote, so it would be possible to adapt this to control it from Isadora via midi/osc/keyboard/take your pick.http://www.norgesgade14.dk/bluetoothremote.phpOn a mac maybe it would be possible to get this to work: http://code.google.com/p/nxtbluetoothbridge/ -
thanks gavspav, I'm using mac, I will investigate, but do you mean this?: http://code.google.com/p/diablu/downloads/detail?name=DiABluLegOSC-0.5.zip&can=2&q=
-
Nope not downloaded it yet. I will do though. And Mark is 100% right in correcting me I was just keeping it simple. It seems Gav is on the case also! Knew Gav would like this ;-)
-
I do like it but I'm not really on the case. Can't think of anything I want to do with it (this week).
Bruper - one thing I wasn't sure of - does the Diablu stuff work with Nxt or Nxt 2.0 (is there a difference?) -
good point Gavspav, I just sent an e-mail to Diablu and will let you know as soon as I receive an answer (from my research "...the NXT 2.0 uses Floating Point operations whereas earlier versions use Integer operation.... The 2.0 software has some great additions (.ric creator, datalogging, etc.) but the software isn't that radically different... In terms of programming and i/o ports they are the same... other differences are plastic and wheels bits and pieces..."
-
Gavspav, I now received an answer from Diablu: NEXT2
-
I was going to have a look at this today but I couldn't get the mindstorms software to run on my system - I'm on Lion.
It returns an error 'unable to open resource files.'A bit of googling suggests its going to eat up time I haven't got.Bruper can you shed any light on this?I used windows before I think - or maybe Snow Leopard - but like I said if you're going to use Windows you can just use the GlovePie script above.The latest stable download of RXTX appears to be the same as the one on Legosc so it looks like you wouldn't need to update the serial library. -
thanks Gavspav, I'm still in Snow Leopard because with Lion there where problems with other software... I will try to find out...
-
I've lent my laptop with 10.6 on to someone so looks like I can't try and get it working without a load of grief.
What you need to do is first connect to the mindstorms. Then follow the legosc instructions - click on legosc.jar/enter the correct com port.Get the connection set up - I'm guessing the log tab will tell you when you are successfully connected.For the purposes of this test connect a motor to port 1 of the nxt brick.Then set the ports up - for the Legosc port choose anything - say 8001.In the Your Application section enter Isadora and for port enter 1234.Then open Isadora. Open a new file. Go to Isadora>Preferences>Midi/Net and check the OSC Port no. is 1234 - if it isn't change it to 1234.Close the preferences.You should see an Isadora window labeled untitled. In the search box in the top left type osc.Near the bottom there should be some text labeled OSC transmit. Click and drag it to the big window on the right.You then should have an OSC transmit actor.Click on the 1234 in the port section of that actor - it should turn yellow. Then change it to 8001.Click on isadora in the address section. Change this to one of the addresses that legosc provides eg /motorForward 1 (or if this doesn't work try /motorForward1 - not sure which it is)Then in the search window in top left, type mouse.Drag the Mouse Watcher (near the bottom) into the right hand window.Connect the 'horizontal postion' of the mouse watcher actor to the 'value' of the OSC Transmit actor.You should now be controlling the speed of the lego motor with the horizontal position of the mouse.I've tried to attach an Isadora patch to save you doing that bit but not sure its working. In any case its only 2 actors.Let us know how it goes. -
thanks Gavspav, I'm trying.... lets see if I can manage, hopefully, have to investigate as something I'm not familiar with :)
but I'm thankful -
Am I being daft but the lego website is awful; been looking for the mac NXT software for nearly half an hour.... any help?
-
Start here with some good information about installing it
https://discussions.apple.com/thread/4158314?start=0&tstart=0Download with Firefox[MINDSTORMS NXT 2.0](http://en-us.kb.lego.com/ics/support/DLRedirect.asp?fileNum=84974&deptID=5622) -
I downloaded that .iso from your link vanakaru and it appears to install ok!
I still haven't got isadora>nxt communication to work - but quite close.A few additions to my earlier post. I didn't connect to the nxt brick using the nxt software but just paired via bluetooth. I used ls /dev/tty.* via terminal to find out which com port i was using. /dev/tty.NXT-DevB for me.I put this into the diablu settings and in the log window it opens the port and starts running the server.It tells you the address legosc is listening too. You use the ip address in the udp adress section of the osc transmit actor in the isadora window. And the last 4 digit number is the port number.Not sure why I am giving this advice as as I said I haven't actually got it to work!I've connected legosc to the nxt brick and am receiving osc data from Isadora but haven't managed to get the motor to move! -
exciting news gavspav you're getting closer!
-
Even closer now - got it working with the Pure Data sample patch and Isadora looked like it should work but then the batteries dies in the Nxt brick.
Loads of batteries in them things. Send me some more! -
are you in London? I can take you some this w/e from Portugal :)
-
Ok finally I have some batteries and can now confirm that Isadora and LegoOsc DON'T work together!
For some reason either LegoOsc or the NXT brick don't understand the OSC messages that Isadora is spitting out.The workaround would be to write some little bridging app in Max or PD that converts say midi to OSC that works.A simple if clumsy solution. -
Dear Gavin,
I can assure you that the OSC messages Isadora sends follow the standard. Have you tried turning off type tags? What kind of messages does the NXT brick expect? Is there any documentation on that?Best Wishes,Mark -
Hmm well it could be human error but it really didn't seem like it. Maybe I'll have another look on Monday.
If I turn off type tags then legoOsc doesn't receive/understand the incoming messages.I had the Pure Data example working and the legoosc java code reports the incoming OSC messages in its log window.I tried it with Isadora and had identical messages in the legoosc log window but the lego brick didn't respond. I assumed it was something to do with OSC message format as I have had problems with this before (not just with Isadora).One thing which could potentially be causing problems is that the message is in the format /motorForward 0 iCould the spaces be causing an issue? Or the fact that I am sending integers?I'm straw clutching rather than employing logic. -
well what exactly comes after the /motorForward part?
/motorForward is a valid OSC address.But is the rest text? is the actual message "0 i" (less the quotes) ? Or???Best Wishes,Mark