Post your NXJ projects, project ideas, etc here!
Moderators: roger, 99jonathan, imaqine
by runix » Sat Apr 30, 2011 7:36 pm
Hello,
I am working on a small project in which the NXT will pay the role of a Scribble Pad. I will build the robot similar to this:
http://www.nxtprograms.com/scribble/index.htmlCan anyone give me an idea of how to read the values from the the two motors and transform them into Cartesian coordinates (x, y) on the LCD display.
Should I use the getAngle API or something similar?
Thank you.
-
runix
- New User
-
- Posts: 2
- Joined: Sat Apr 30, 2011 7:26 pm
by skoehler » Sat Apr 30, 2011 11:34 pm
The value of Motor.B and Motor.C.getTachoCount() increases/decreses by 1 for every degree the motor axis moves.
The rest should be simple math.
-
skoehler
- leJOS Team Member
-
- Posts: 1110
- Joined: Thu Oct 30, 2008 4:54 pm
by runix » Sat Apr 30, 2011 11:48 pm
Thank you Skoehler. I think that this should do it.
-
runix
- New User
-
- Posts: 2
- Joined: Sat Apr 30, 2011 7:26 pm
Return to NXJ Projects
Who is online
Users browsing this forum: No registered users and 2 guests