View Single Post
  #14   Spotlight this post!  
Unread 20-02-2004, 21:32
Xufer's Avatar
Xufer Xufer is offline
8 Seasons and as stable as ever
AKA: Working, 2/4 degrees complete still schooling...
FRC #1740 (The Cyber Colonels)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Waterford, CT
Posts: 231
Xufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to behold
Send a message via AIM to Xufer Send a message via MSN to Xufer Send a message via Yahoo to Xufer
Re: Little help Please (with dead reconing code)

see when i read your post it popped into my head i wrote a counter and threw in some arbitrary numbers im just waiting to test it now, but thanks for the help, heres what i wrote.

Code:
if (rc_dig_in17) {
{
pwm01=200;                                /*Go forward for 2000*/
pwm02=200;
for(i = 0; i < 2000; ++ i);
pwm01=127;								  /*stop after*/
pwm02=127;
/*------------------------------------------------------------------------------*/
pwm01=127;                                /*Go right for 200*/
pwm02=200;
for(i = 0; i < 200; ++ i);
pwm01=127;								  /*stop after*/
pwm02=127;
/*-----------------------------------------------------------------------------*/
pwm01=200;                                /*Go forward for 200*/
pwm02=200;
for(i = 0; i < 2000; ++ i);
pwm01=127;								  /*stop after*/
pwm02=127;

}
}
/**********************************************DEADRECB*************************/
if (rc_dig_in16) {
{
pwm01=200;                                /*Go forward for 2000*/
pwm02=200;
for(i = 0; i < 2000; ++ i);
pwm01=127;								  /*stop after*/
pwm02=127;
/*------------------------------------------------------------------------------*/
pwm01=200;                                /*Go left for 200*/
pwm02=127;
for(i = 0; i < 200; ++ i);
pwm01=127;								  /*stop after*/
pwm02=127;
/*-----------------------------------------------------------------------------*/
pwm01=200;                                /*Go forward for 200*/
pwm02=200;
for(i = 0; i < 2000; ++ i);
pwm01=127;								  /*stop after*/
pwm02=127;

}
}
__________________


If saftey is first and i put FIRST ahead of everything, then i must be the safest guy in the world.

Team 521 Alumni -- Team 1740 Mentor-- Go Go 1740!
Sometimes I think I've been doing this too long and other times I think I haven't done this enough... but all the times I'm sure I'm crazy
Photonics, It's Your Future