ServoPAL_IR_Roaming.bs2 --- code question
ryan.sessman
Posts: 12
Read both IR sensors. Put inverted values into position in Obstacle.
ReadIR:
FREQOUT IREmtR, 1, 38500 'Activate the right IR emitter.
Obstacle.BIT0 = ~IRDetR 'Read the right IR sensor (and invert).
FREQOUT IREmtL, 1, 38500 'Activate the left IR emitter.
Obstacle.BIT1 = ~IRdetL 'Read the left IR sensor (and invert).
RETURN
I don't understand why IRDetR and IRDetL needs to be inverted.
Comments