if rc_sw2=1 then straight: if rc_sw1=1 AND rc_sw3=0 then turnleft: if rc_sw3=1 AND rc_sw1=0 then turnright: if rc_sw1=0 AND rc_sw2=0 AND rc_sw3=0 then straight: