View unanswered posts | View active topics It is currently Tue Sep 30, 2014 8:21 am






Reply to topic  [ 4 posts ] 
How to stop intakebot from moving by itself. 
Author Message
Rookie

Joined: Sun Aug 11, 2013 6:00 pm
Posts: 2
Post How to stop intakebot from moving by itself.
At the beginning of the program my intakebot always moves by itself without me controlling it through programming or the WASD keys. How can I make it so that it doesn't move.

Also, isn't 275 the encoder value that needs to be met to make a 90-degree point turn? It was in the Summer of Learning course at least. If not I guess I could use the gyro.

Thanks! :D


Sun Aug 11, 2013 6:05 pm
Profile
Rookie

Joined: Thu May 02, 2013 10:52 am
Posts: 22
Post Re: How to stop intakebot from moving by itself.
Are you running any code when this happens? If so, would you be willing to post your code (the first part up until the moving by its self might be all that is needed)? Does it happen right away or does it move along a bit and then do it? I don't think this is what you want, but if you want the robot to not move at all no matter what you tell it after (since it won't get there), try this:
Code:
   while(true)
   {
      motor[motorName] = 0;
   }
And add a motor[motorName] = 0; to it for each of the motors.

As for turning, I would suggest using the gyro. It should be more accurate compared to the encoders since it doesn't depend upon the angle it was facing before the turn (as long as you don't reset the gyro before every turn).
However if you want to use the encoders for making a turn, I am not sure if the 275 is the correct value for a 90° turn, but you can try to find it out by turning x encoder ticks and adjusting the value until it is a 90° turn.

_________________
What is easy you have done, what is hard you can do, what is impossible will take a little longer


Mon Aug 12, 2013 11:04 am
Profile
Rookie

Joined: Sun Aug 11, 2013 6:00 pm
Posts: 2
Post Re: How to stop intakebot from moving by itself.
Sorry, I was away for a bit. Here is my code (at least the part that causes this to happen):

Code:
task main()
{

   motor[intakeMotor] = 127;
   wait1Msec(5000);      //Time intake runs
   motor[intakeMotor] = 0;
   wait1Msec(2000);
}


This code is regularly in a function but it still malfunctions like this. As you can probably tell this code is supposed to make the rollers spin for 5 seconds. What it actually does is that it intakes the pre-loaded buckyball and drives a bit forward.

I think I may have found an explanation though. When I originally posted this message I forgot that the pre-load can be picked up by driving over it (right?). So, I think that I may have a mistake with my motor setup. I have the intake rollers setup for port 1 is this wrong? A specification sheet for the intakebot would be nice.

As for turns, I will go with the gyro.

Thanks!


Wed Aug 14, 2013 2:17 pm
Profile
Rookie

Joined: Thu May 02, 2013 10:52 am
Posts: 22
Post Re: How to stop intakebot from moving by itself.
Motor port 1 is the intake, if you look at the part where you select either the intakebot or ballerbot the motor and sensor port information is there.

I tried your code and the intakebot slowly move forward while the motor is turning. I am guessing that it is a RVW glitch/overactive physics on the intake. I tried having the drive motors slowly turn back and that does help to counteract the movement. I would suggest having the intake intake less and/or having it actively try to hold its place.

_________________
What is easy you have done, what is hard you can do, what is impossible will take a little longer


Wed Aug 14, 2013 6:05 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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.