varunme
Advanced Member level 3
like
I want to build code that is independant of the direction of the object cutting the sensor.
Code:
a=1;
b=2;
if(portc.f1==1)
{
portd.f1=1; //100% Brightness
}
else
{
portd.f1=1; //pwm=50%
delay_ms(a);
portd.f1=0;
delay_ms(b);
}
I want to build code that is independant of the direction of the object cutting the sensor.