ROBOTC.net forums
http://robotc.net/forums/

simultaneous tasks?
http://robotc.net/forums/viewtopic.php?f=11&t=7831
Page 1 of 1

Author:  licciardij [ Thu Jan 30, 2014 1:18 pm ]
Post subject:  simultaneous tasks?

can anyone tell me why i can't get this servo to rotate and work with the program simultaneously? there is a motor to control marble drop (normal motor) then a servo to collect and allow the line reader to read and then dump into one of three cups that sits on a different servo for separation. file is attached.

Attachments:
NewFile_Template002.c [1.48 KiB]
Downloaded 359 times

Author:  JohnWatson [ Thu Jan 30, 2014 3:01 pm ]
Post subject:  Re: simultaneous tasks?

There is a bit more information we will need in order to help with this issue. What is the robot doing, and what would you like for it to do? Which servo is not doing what you would like for it to do, and where in the code does this problem arise? The more detailed information you can give us on this particular issue, the better we will be able to assist you.

Right off the bat, I do see one thing that may be causing issues:

Code:
setServo(servoPort, -120);//Spinner will allow one marble through
waitInMilliseconds(150);


This moves the servo to position -120, but will give it 150 milliseconds to get there (0.150 seconds) before moving on the to the next command. This may not be enough time to have the motor moved to the position you want it to be in.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/