Tetrix motor controller heavily delayed responses.

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: imaqine, 99jonathan, roger

New User
Posts: 22
Joined: Mon Aug 01, 2011 12:34 am
Location: Nebraska, USA

Tetrix motor controller heavily delayed responses.

Postby zbuhman » Sat Jan 21, 2012 8:04 pm

I'm using the lejos snapshot from the trunk that I checked out two days ago.

I was just half-reading what the tutorial had to say, and I decided I'd do the first motor control problem with the tetrix motor controller.

My implementation: http://sprunge.us/dNVG?java ; it seems that even doing the motor operation first thing in the loop, "forward/backward" appears on the screen several seconds (~3-6 seconds in my repeated experiments) before the motor changes direction appropriately.

But it's just the motor operations in the middle of the loop that are heavily delayed. The first forward() and the stop() method appear to be instantaneous. Out of curiosity, I then modified my code to this: http://sprunge.us/dceI?java, and that seems to work very responsively. Why should/does it appear to make a difference what the motor controller is doing before you send it a command?

Any java-specific suggestions are also welcome.

User avatar
leJOS Team Member
Posts: 305
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Re: Tetrix motor controller heavily delayed responses.

Postby kirkpthompson » Fri Jan 27, 2012 3:07 pm


The TETRIX motor controller does all the actual control of motors whilst the leJOS Classes just communicate the proper I2C commands to the controller for each motor, implementing the standard leJOS motor interfaces. If your second example works, I would recommend using it. We really have no control over how the internal firmware of the motor controller implements a switch in directions. Maybe you could do some more testing and characterization to see if a pattern emerges...

Leg Godt!

Return to “NXJ Software”

Who is online

Users browsing this forum: No registered users and 3 guests