View Single Post
  #3   Spotlight this post!  
Unread 28-02-2005, 11:49
bombadier337's Avatar
bombadier337 bombadier337 is offline
1337 U53R
AKA: Shaver
None #1541 (MidloCANics)
Team Role: College Student
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Richmond VA
Posts: 123
bombadier337 is just really nicebombadier337 is just really nicebombadier337 is just really nicebombadier337 is just really nice
Send a message via AIM to bombadier337
Re: Autonomous Code (Help!!!)

You could do something like this

in user_routines_fast

timer++;
if(timer<300)
{
pwm11=255;
pwm12=0;
}
else if(timer<310)
{
relay4_fwd=1;
}
else if(timer<320)
{
relay5_fwd=1;
relay4_fwd=0;
}
else if(timer<440)
{
pwm12=255;
pwm11=0;
}

BUT, you'll probably have to change the pwm's around to make it go forward. Also, you never said if you wanted the relays on fwd or rev. Also, all the times are only approximate, and relay4_fwd is only on for 1/6 of a second and relay5_fwd stays on forever, once relay4_fwd turns off. Hope that helps or gets you started.

Also, i just used arbitrarily 60 cycles as one second, which is wrong, so don't trust that.
__________________
Midlothian High School - Team 1541
2005 Radioshack Innovation in Control - NASA/VCU Regional
2005 Rookie Inspiration - NASA/VCU Regional