Motor.A.getTachoCount() returns only 0,1,-1

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

Moderators: imaqine, 99jonathan, roger

New User
Posts: 1
Joined: Sat Mar 24, 2012 6:35 am

Motor.A.getTachoCount() returns only 0,1,-1

Postby bryan225 » Sat Mar 24, 2012 6:43 am

Hi all,

I am getting started with leJos and got this problem today (sorry if this is too obvious, I googled and searched on this forum for a while and couldn't find a solution) when I tried the sample project where you rotate Motor.A for 1440 degrees and at the same time read the tacho count.

I had the problem with Motor.A coz it keeps rotating forever and the tacho count is always 1, 0 or -1. I tried to use Motor.B and it works fine. I tried connecting the original motor A (physical) to port B and it works fine also. So I know it is not the motor, not the cable, and I'm wondering if it is about how port A behaves (or am I missing anything?)

Thanks for the help!

User avatar
leJOS Team Member
Posts: 5970
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Motor.A.getTachoCount() returns only 0,1,-1

Postby gloomyandy » Sat Mar 24, 2012 8:13 am

When asking for help it makes it much easier if you supply as much information as possible....
What version of leJOS?
is your program running on the nxt or does it use the leJOS pc API?
If using the PC API are you using leJOS firmware or the standard firmware and how are you connecting to the nxt?

Return to “NXJ Software”

Who is online

Users browsing this forum: No registered users and 3 guests