-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCG BOT Line Follower .xml
1 lines (1 loc) · 2.88 KB
/
CG BOT Line Follower .xml
1
<xml xmlns="http://www.w3.org/1999/xhtml"><block type="variables_set" id="1098" x="38" y="88"><field name="VAR">Left</field><value name="VALUE"><block type="inout_digital_read" id="1113"><field name="PIN">A2</field></block></value><next><block type="variables_set" id="1099"><field name="VAR">Right</field><value name="VALUE"><block type="inout_digital_read" id="1114"><field name="PIN">A3</field></block></value><next><block type="controls_if" id="1139"><mutation elseif="3"></mutation><value name="IF0"><block type="logic_operation" id="1151"><field name="OP">AND</field><value name="A"><block type="variables_get" id="1223"><field name="VAR">Left</field></block></value><value name="B"><block type="variables_get" id="1224"><field name="VAR">Right</field></block></value></block></value><statement name="DO0"><block type="setMotor" id="1216"><field name="motorChoice">1</field><field name="direction">FORWARD</field><value name="motorSpeed"><block type="math_number" id="1217"><field name="NUM">255</field></block></value><next><block type="setMotor" id="1218"><field name="motorChoice">4</field><field name="direction">FORWARD</field><value name="motorSpeed"><block type="math_number" id="1219"><field name="NUM">255</field></block></value></block></next></block></statement><value name="IF1"><block type="logic_operation" id="1238"><field name="OP">AND</field><value name="A"><block type="logic_negate" id="1237"><value name="BOOL"><block type="variables_get" id="1239"><field name="VAR">Left</field></block></value></block></value><value name="B"><block type="variables_get" id="1240"><field name="VAR">Right</field></block></value></block></value><statement name="DO1"><block type="TurnRight" id="1262"><value name="rightSpeed"><block type="math_number" id="1263"><field name="NUM">255</field></block></value></block></statement><value name="IF2"><block type="logic_operation" id="1265"><field name="OP">AND</field><value name="A"><block type="variables_get" id="1266"><field name="VAR">Left</field></block></value><value name="B"><block type="logic_negate" id="1273"><value name="BOOL"><block type="variables_get" id="1267"><field name="VAR">Right</field></block></value></block></value></block></value><statement name="DO2"><block type="TurnLeft" id="1283"><value name="leftSpeed"><block type="math_number" id="1284"><field name="NUM">255</field></block></value></block></statement><value name="IF3"><block type="logic_operation" id="1299"><field name="OP">AND</field><value name="A"><block type="logic_negate" id="1298"><value name="BOOL"><block type="variables_get" id="1300"><field name="VAR">Left</field></block></value></block></value><value name="B"><block type="logic_negate" id="1301"><value name="BOOL"><block type="variables_get" id="1302"><field name="VAR">Right</field></block></value></block></value></block></value><statement name="DO3"><block type="Stop" id="1297"></block></statement></block></next></block></next></block></xml>