I am kind of new to programming but i'm getting the hang of it now. I have one problem that I haven't been able to solve. i have an Nxt motor. I want to be able to press a button on the joystick, and while it is pressed i want the motor to move to a certain position. Yet if i let go of the motor i want it to stop moving. If i keep pressing the button I want it to get to its limit position. Once it gets to the limit position, even if i am pressing the button, i want it to stop. The limit position is just a variable number. How can I go about doing this? I have tried to use the sample code given in Robot C for lego motors and I have tried to modify it but i just cant seem to get it to work. I would really appreciate your help. Thank You
Tue Feb 08, 2011 1:57 pm
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1023
Re: LEGO MOTOR ENCODERS
I don't have RobotC in front of me, so some of the functions may be wrong, but it looks something like this:
Users browsing this forum: No registered users and 4 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum