|
Re: Hybrid Challenge-No Robot Left Behind
Quote:
Originally Posted by timville
The problem with the code above is that the IR sensor does not remain as a "1" state when you hold the button. I believe the IR sensor will pulse the circut open and close every 100ms.
See my reply to your other thread with sample code on how to use the IR sensor with ROBOTC. http://www.chiefdelphi.com/forums/sh...ad.php?t=63004
|
yes.
what you need to do looks more like this:
Code:
If (RC_dig_in04)
c=0;
If (RC_dig_in01)
c=1;
If (RC_dig_in02)
c=2;
If (RC_dig_in03)
c=3;
if (c==1)
pwm01=254;
if (c==2)
Pwm02=0;
if (c==3)
Pwm05=160;
__________________
My FRC record: 10 Years,FTA (2008-9), 3 Teams(1947,2669,3211).3 RCA, 1 Championship EI(2016), 1 Divisional finalist (2016), 1 Regional winner.
Israeli 2016 Volunteer of the year.
|