View unanswered posts | View active topics It is currently Mon Nov 24, 2014 6:43 pm






Reply to topic  [ 2 posts ] 
simultaneous tasks? 
Author Message
Rookie

Joined: Wed Nov 14, 2012 12:07 pm
Posts: 4
Post 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 85 times
Thu Jan 30, 2014 1:18 pm
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 609
Post 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.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Thu Jan 30, 2014 3:01 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 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

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.