Brian,

I am afraid I dont have any good ideas on how to keep the constructor
of the NXTcomm object private, and still create multiple instances..

I suppose the Lejos API was developed with the intent of being run
"embedded", and therefore the "singleton" like behaviour of the NXT
(or RCX) class was highly desirable..

-Rohit


On 9/24/06, Brian Bagnall <[EMAIL PROTECTED]> wrote:
> > 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)..
>
> Thanks, I'll add that to the OSX docs.
>
> > I also noticed when trying out the DistanceTest program that several
> > commands result in I2C error, is this to be expected for now?
>
> Yes, UltrasonicSensor and I2C will both give errors from time to time, but
> you probably get the correct reading anyway. You'll notice it's inconsistent
> when you get the errors. Lego has some bugs in the I2C part of the firmware,
> but I think they'll be fixing those for the next release. I think it's those
> bugs that are affecting this.
>
> > 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..
>
> Initially I made the API like that so you could use more than one NXT brick,
> but it wasn't very leJOS-like, so I changed it around, thinking there
> wouldn't be too many people with 2 bricks.  This will take some thinking to
> allow 2 bricks *and* have a leJOS-like API. Any suggestions?
>
> - Brian
>
>
> -------------------------------------------------------------------------
> 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
> Lejos-discussion@lists.sourceforge.net
> 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
Lejos-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lejos-discussion

Reply via email to