It turns out the problem with I2C errors wasn't with the Lego firmware as I first thought. I wasn't using the LSGETSTATUS function properly. It's all patched up for the next release and much more stable.
The getDistances() method also returns up to 8 pings from the ultrasonic sensor, which is very cool if you want to make a sonar system. - Brian ----- Original Message ----- From: "Rohit Singh" <[EMAIL PROTECTED]> To: "Brian Bagnall" <[EMAIL PROTECTED]> Sent: Sunday, September 24, 2006 12:45 PM Subject: Re: Re: [Lejos-discussion] iCommand, NXT, Mac OS X (Intel) > Brian, > > Mixed success.. > > I have two NXTs, called NXT1 and NXT2... I have managed to get v0.4 > work for NXT2, but not NXT1, and I dont yet know what is going on.. > > This is what i did.. I use "tcsh" instead of the default bash shell in > OSX.. In tcsh, on the command line, one can simply use "> setenv > NXTCOMM /dev/tty.NXT_2" or ">setenv NXTCOMM /dev/tty.NXT_1", and start > the programs.. (However, as i said, for some reason, I cannot get one > of the NXTs to work).. > > I also noticed when trying out the DistanceTest program that several > commands result in I2C error, is this to be expected for now? > > Finally, any particular reason why you made this change to iCommand? > In my case, working with two NXTs, I woule prefer a way i could > construct two instances of NXTs in one program, and build a > synchronized system. With the current method of instantiating through > an environment variable, i will have to build two programs, and > perform some inter-process communication to implement synchronized > behavior.. > > -Rohit > > > > > > > On 9/23/06, Brian Bagnall <[EMAIL PROTECTED]> wrote: >> That's good news, Rohit. I've added those directions to the readme. >> >> With iCommand 0.4 you need to setup an environment variable to tell >> iCommand >> which COM port to use. Do you think you could try this out with MacOSX >> and >> let me know how you did it so I can add it to the docs? >> >> - Brian >> >> ----- Original Message ----- >> From: "Rohit Singh" <[EMAIL PROTECTED]> >> To: <[email protected]> >> Sent: Friday, September 22, 2006 6:08 PM >> Subject: Re: [Lejos-discussion] iCommand, NXT, Mac OS X (Intel) >> >> >> > Success! >> > >> > What I found when experimenting today was that I did not need to >> > manually open the serial connections at all! This is what was causing >> > problems in the first place.. >> > >> > So I can conform that I have iCommands (0.3) working on a Mac (Intel >> > Macbook)! >> > >> > Here is what I did to get the environment set up: >> > >> > 1) Copy files RXTXComm.jar, rxtxSerial.jnilib and iCommand.jar in the >> > directory /Library/Java/Extensions/ This obliviated the need to >> > include the location of these files in the classpath, without much of >> > a compromise.. >> > >> > 2) Create directory /var/spool/uucp,and set up appropriate permissions >> > (I just used 777, and included my username in the uucp group using the >> > NetInfo manager. There is quite a lot of information on the web on >> > installation of the RXTX libary on OS X. >> > >> > 3) Set up the NXT with the computer, and establish a serial channel to >> > it using the Bluetooth setup utility on OS X. You can verify that this >> > is set up by listing the contents of the /dev/ directory...My "ls" >> > shows "tty.NXT_1", which is what I defined as my connection in the BT >> > tool.. >> > >> > The javac and java tools can be used directly on the command line on >> > OSX to invoke the compiler and Java run time. >> > >> > I am using NXTs with firmware v 1.03, and Java on my Macbook is >> > v1.5.0_06. >> > >> > -Rohit >> > >> > On 9/21/06, Rohit Singh <[EMAIL PROTECTED]> wrote: >> >> Thanks for your reply Brian. >> >> >> >> I will send you detailed notes of the steps I have taken, and the >> >> messages I >> >> get.. >> >> >> >> >> >> In the meantime, here are some basic questions: >> >> >> >> What is the right sequence of establishing the connection between the >> >> NXT >> >> and a computer? >> >> >> >> The only way I get anything to work is when I open a "listener" on the >> >> computer (a terminal, or a serial Port program, or a iCommand program) >> >> pointing at the appropriate serial port, and then try to use the NXT >> >> menus >> >> to connect to the computer. In this case, I can see my computer on the >> >> NXT >> >> BT search, and am given the option of using one of channels 1,2 or 3 >> >> to >> >> connect. Channel 0 appears grayed out. The connection is usually >> >> successful >> >> if I use this sequence.. (but of course I still dont get the iCommand >> >> commends to return..) >> >> >> >> If I reverse the order, ie do not open the serial port on the Mac >> >> before >> >> I >> >> try to establish the connection from the NXT menu, I get a "line busy" >> >> message.. >> >> >> >> Is this to be expected? Could it be an issue of incorrect seial port >> >> settings when the communication is first established? >> >> >> >> Why does channel "0" appear grayed out? Something with the >> >> master/slave >> >> settings on the NXT BT implementation? >> >> >> >> Thanks >> >> >> >> -Rohit >> >> >> >> >> >> >> >> >> >> >> >> On 9/21/06, Brian Bagnall <[EMAIL PROTECTED]> wrote: >> >> > Hi Rohit, >> >> > >> >> > I'm glad someone is attempting iCommand on a Mac. Please document >> >> > all >> >> > the >> >> > steps you took to get this far. >> >> > >> >> > The fact that you are seeing <> on the NXT is a good sign. Make sure >> >> > to >> >> > power the brick off/on after each program attempt. Other than that >> >> > I'm >> >> > not >> >> > sure how much I can help. Maybe give version 0.4 a try when it's >> >> > released >> >> > later in the week. >> >> > >> >> > - Brian >> >> > >> >> > ----- Original Message ----- >> >> > From: "Rohit Singh" < [EMAIL PROTECTED]> >> >> > To: <[email protected]> >> >> > Sent: Monday, September 18, 2006 12:45 PM >> >> > Subject: [Lejos-discussion] iCommand, NXT, Mac OS X (Intel) >> >> > >> >> > >> >> > > Hi, >> >> > > >> >> > > I am trying to get iCommand to work on my Mac (Intel), but am >> >> > > having >> >> > > problems with it.. >> >> > > >> >> > > I know that the serial tunnel is working over bluetooth (I can >> >> > > initiate messages from the brick to the computer, and verify it >> >> > > with >> >> > > a >> >> > > terminal). However, when trying to run the TachoCount or Melody >> >> > > programs included in the iCommand distribution (samples), the java >> >> > > program seems to hang (as if waiting on something). >> >> > > >> >> > > The BT icon on the NXT changes from a "<" to a "<>" symbol, but >> >> > > the >> >> > > NXT commands on the computer never seem to return... >> >> > > >> >> > > Would appreciate any help... >> >> > > >> >> > > Thanks >> >> > > >> >> > > Rohit >> >> > > >> >> > > >> >> ------------------------------------------------------------------------- >> >> > > Using Tomcat but need to do more? Need to support web services, >> >> security? >> >> > > Get stuff done quickly with pre-integrated technology to make your >> >> > > job >> >> > > easier >> >> > > Download IBM WebSphere Application Server v.1.0.1 based on Apache >> >> Geronimo >> >> > > >> >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> >> > > _______________________________________________ >> >> > > Lejos-discussion mailing list >> >> > > [email protected] >> >> > > >> >> https://lists.sourceforge.net/lists/listinfo/lejos-discussion >> >> > > >> >> > >> >> > >> >> > >> >> ------------------------------------------------------------------------- >> >> > Take Surveys. Earn Cash. Influence the Future of IT >> >> > Join SourceForge.net's Techsay panel and you'll get the chance to >> >> > share >> >> your >> >> > opinions on IT & business topics through brief surveys -- and earn >> >> > cash >> >> > >> >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> >> > _______________________________________________ >> >> > Lejos-discussion mailing list >> >> > [email protected] >> >> > >> >> https://lists.sourceforge.net/lists/listinfo/lejos-discussion >> >> > >> >> >> >> >> > >> > ------------------------------------------------------------------------- >> > Take Surveys. Earn Cash. Influence the Future of IT >> > Join SourceForge.net's Techsay panel and you'll get the chance to share >> > your >> > opinions on IT & business topics through brief surveys -- and earn cash >> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> > _______________________________________________ >> > Lejos-discussion mailing list >> > [email protected] >> > https://lists.sourceforge.net/lists/listinfo/lejos-discussion >> > >> >> >> ------------------------------------------------------------------------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share >> your >> opinions on IT & business topics through brief surveys -- and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ >> Lejos-discussion mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/lejos-discussion >> > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Lejos-discussion mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lejos-discussion
