View Single Post
  #1   Spotlight this post!  
Unread 24-03-2004, 19:47
Robohawk-master's Avatar
Robohawk-master Robohawk-master is offline
Registered User
AKA: Barry
#1109 (Robohawks)
Team Role: Operator
 
Join Date: Mar 2004
Rookie Year: 2003
Location: Lively, Ontario
Posts: 21
Robohawk-master is on a distinguished road
More automonous help:ending stuff

OK! I got a line sensor code (verrrrrry basic) and I would like to now a few things:

1. I know the robot will arrive at the T in under 15 secs, so how do I stop it and do something different?

2. If I stop it, we would like to raise our arm (on winch), which is on a PWM.

3. How would I stop the arm? Same way as # 1?

Code:
 
if (rc_dig_in01 == 0 && rc_dig_in02 == 0 && rc_dig_in03 == 0)
			{
				pwm13 = 127;
				pwm15 = 127;
			}
			else if (rc_dig_in01 == 0 && rc_dig_in02 == 0 && rc_dig_in03 == 1)
			{
				pwm13 = 139;
				pwm15 = 175;
			}
			else if (rc_dig_in01 == 1 && rc_dig_in02 == 0 && rc_dig_in03 == 0)
			{
				pwm13 = 175;
				pwm15 = 139;
			}
			else if (rc_dig_in01 == 0 && rc_dig_in02 == 1 && rc_dig_in03 == 0)
			{
				pwm13 = 249;
				pwm15 = 249;
			}
__________________
- Barry -
-2004 Canadian Regional Semi-Finalists
-2004 Bruce Power Safety Award