View Single Post
  #12   Spotlight this post!  
Unread 13-02-2004, 00:41
LBK Rules's Avatar
LBK Rules LBK Rules is offline
1467 '06 Alumni
AKA: Anthony Rinaldi
no team (HSRO)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2003
Location: Henrico, VA
Posts: 438
LBK Rules will become famous soon enoughLBK Rules will become famous soon enough
Re: Newbie Autonomous Question(s)

Our robot will not follow a line of tape. (The banners are calibrated correctly.)

Let me explain our setup:
pwm01 = Left Drive Wheel
pwm02 = Right Drive Wheel

rc_digi_in01 = Left Banner (WHITE Sig.)
rc_digi_in02 = Right Banner (WHITE Sig.)

Our Autonomus Code:
PHP Code:
if (rc_dig_in01 == && rc_dig_in02 == 1
        {
            
pwm01 117;
            
pwm02 117;
        }
        
        if (
rc_dig_in02 == && rc_dig_in01 1
        {
            
pwm01 117;
            
pwm02 113;
        }
        
        if (
rc_dig_in02 && rc_dig_in01 == 1
        {
            
pwm01 113;
            
pwm02 117;
        }

        if (
rc_dig_in01 && rc_dig_in02 1
        {
            
pwm01 137;
            
pwm02 137;
        } 
Our pwm output is reversed since we are driving the robot backwards in autonomus mode. (The locations I stated above are in autonomus mode.)

The problem is our robot will not do anything if the sensors are not seeing the tape. It just stops.

We are clueless, and any help would be appreciated. (This is the first time I worked with any C[++] programming other than the old "Hello, World!" program. (If you see any bugs in our code, please respond! ))

LBK Rules; VB Programmer being suddenly forced to C by FIRST (or IFI, I don't know which). (BTW: I just got back from a meeting about an hour ago.)
__________________
Anthony Rinaldi
Team 1132: 2003
Team 1467: 2004 - 2006