Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Newbie Autonomous Question(s) (http://www.chiefdelphi.com/forums/showthread.php?t=24604)

deltacoder1020 14-02-2004 20:54

Re: Newbie Autonomous Question(s)
 
also, remember the built-in deadzone on the Victors, which is approximately 10 in either direction, so 117 and 137 are right on the edge of this deadzone - the robot is going to move almost not at all. i'd recommend something close to 150 and 100 or so at the least. your problem is probably that you're setting both of the motors inside the deadzone, so the robot doesn't move.

platt 16-02-2004 10:02

Re: Newbie Autonomous Question(s)
 
hey i am a new team and i am i a great need is there a code for the stupid banner sensore some plz help

Ryan M. 16-02-2004 11:23

Re: Newbie Autonomous Question(s)
 
Quote:

Originally Posted by platt
hey i am a new team and i am i a great need is there a code for the stupid banner sensore some plz help

What sort of code? I assume you mean line following or something similar. Do a search for banner or line or something like that. There's tons of stuff that has already been said about this sort of thing. If you can't find what you need, post again.

Phil_Lutz 16-02-2004 11:35

Re: Newbie Autonomous Question(s)
 
Quote:

Originally Posted by Texan
Third, make the power that the motors are driven at a little higher. I'm not sure if your problem was that it wasn't moving, but the way it is now, it will either move really slow or not at all.

The Victor 884 speed controllers have a deadpan (no movement spot) between 117 and 137 with 127 as neutral. Therefore, you are not getting outside the speed controllers "don't move" range.

Increase the numbers to something like 90 and 164.

Phil

LBK Rules 16-02-2004 11:45

Re: Newbie Autonomous Question(s)
 
Our Victors don't have a deadpan. going 107:147 makes our robot overshoot the line. (I thought the 883 had the deadpan, and not the 884.)

Our team has been trying to code the banners, and we just can't get it to work right.

If somebody can please post some working line fowolling code, I know all of us newbies woud greatly appreciate it.

Phil_Lutz 16-02-2004 11:51

Re: Newbie Autonomous Question(s)
 
Quote:

Originally Posted by LBK Rules
Our Victors don't have a deadpan.

Are you using the 884's in the kit? They do have a deadpan.

Also, calibrate the Victors. This might be your problem.

Phil

Ryan M. 16-02-2004 13:47

Re: Newbie Autonomous Question(s)
 
Quote:

Originally Posted by LBK Rules
Our team has been trying to code the banners, and we just can't get it to work right.

If somebody can please post some working line fowolling code, I know all of us newbies woud greatly appreciate it.

Well, I can't guarrantee this works, but if you want to look at it... :)
PHP Code:

// Check if the right sensor is reading the line
if(lineDetectorLeft == ON_LINE)
{
  
// Turn right
  
driveMotorLeft 127;
  
driveMotorRight 254;
}
else if(
lineDetectorRight == ON_LINE)
{
  
// Turn left
  
driveMotorLeft 254;
  
driveMotorRight 127;
}
else
{
  
// Go forward
  
driveMotorLeft 254;
  
driveMotorRight 254;


Subsitute pwmXX for the driveMotorLeft and Rights, the lineDetectorLeft and Rights with the digital inputs they are on, and the ON_LINEs with the value that the sensors read when over the line. This is a very simple algorithm and can be improved, but it gives you the idea. Put it in its own function and continually call it and it will (should) faithfully follow a line.

--EDIT--
You can also adjust the speeds passed to the motors. The way it is now, it might lose the line because it is too fast. :)


All times are GMT -5. The time now is 00:03.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi