Skip to content

Instantly share code, notes, and snippets.

@gnarmis
Created April 24, 2018 21:57
Show Gist options
  • Save gnarmis/9509e84f173c13022bbb6768c5ad1099 to your computer and use it in GitHub Desktop.
Save gnarmis/9509e84f173c13022bbb6768c5ad1099 to your computer and use it in GitHub Desktop.
NEPO program: sensor_loop
<export xmlns="http://de.fhg.iais.roberta.blockly"><program><block_set xmlns="http://de.fhg.iais.roberta.blockly" robottype="ev3" xmlversion="2.0" description="" tags=""><instance x="178" y="45"><block type="robControls_start" id="KF=O@fUtUJy5HXbAjbK(" intask="true" deletable="false"><mutation declare="false"></mutation><field name="DEBUG">FALSE</field></block><block type="robControls_loopForever" id="c30IgWEeP/O-?U4y%vW^" intask="true"><statement name="DO"><block type="robControls_ifElse" id="J[`1E#d%TdTWPv{Km`jh" intask="true"><mutation else="1"></mutation><repetitions><value name="IF0"><block type="logic_compare" id="+Jrku0q15][email protected]" intask="true"><field name="OP">LT</field><value name="A"><block type="robSensors_colour_getSample" id="mN_gllFh2X~)x*7gD17D" intask="true"><mutation mode="LIGHT"></mutation><field name="MODE">LIGHT</field><field name="SENSORPORT">3</field><field name="SLOT"></field></block></value><value name="B"><block type="math_number" id="k=Xc?r[Ty1[.Ovv6E,k-" intask="true"><field name="NUM">20</field></block></value></block></value><statement name="DO0"><block type="robActions_motorDiff_on_for" id="6)^ZQ3l.^^E@b@OrBZ84" intask="true"><field name="DIRECTION">FOREWARD</field><value name="POWER"><block type="math_number" id="U}B2(vXaoe2EaDhiQ6{P" intask="true"><field name="NUM">30</field></block></value><value name="DISTANCE"><block type="math_number" id="z)HUO,tBtenAg!ORh6]A" intask="true"><field name="NUM">5</field></block></value></block></statement><statement name="ELSE"><block type="robActions_motorDiff_on_for" id="T50rNJ8V4,+(^z]*BPPo" intask="true"><field name="DIRECTION">BACKWARDS</field><value name="POWER"><block type="math_number" id="0d9/F2G(T5ye[PgGe2@3" intask="true"><field name="NUM">30</field></block></value><value name="DISTANCE"><block type="math_number" id="TS)|Qk#L]%5W5hF^*m,?" intask="true"><field name="NUM">5</field></block></value></block><block type="robActions_motorDiff_turn_for" id="8(OiD^=qU#/fqZ*A@bN6" intask="true"><field name="DIRECTION">LEFT</field><value name="POWER"><block type="math_number" id="+r[;pEdyG5tOudzp6/Te" intask="true"><field name="NUM">30</field></block></value><value name="DEGREE"><block type="math_number" id="NAa%0N]jL~8q9TKad6v%" intask="true"><field name="NUM">90</field></block></value></block></statement></repetitions></block></statement></block></instance></block_set></program><config><block_set xmlns="http://de.fhg.iais.roberta.blockly" robottype="ev3" xmlversion="" description="" tags=""> <instance x="213" y="213"> <block type="robBrick_EV3-Brick" id="1" intask="true" deletable="false"> <field name="WHEEL_DIAMETER">5.6</field> <field name="TRACK_WIDTH">18</field> <value name="S1"> <block type="robBrick_touch" id="2" intask="true"></block> </value> <value name="S2"> <block type="robBrick_gyro" id="3" intask="true"></block> </value> <value name="S3"> <block type="robBrick_colour" id="4" intask="true"></block> </value> <value name="S4"> <block type="robBrick_ultrasonic" id="5" intask="true"></block> </value> <value name="MB"> <block type="robBrick_motor_big" id="6" intask="true"> <field name="MOTOR_REGULATION">TRUE</field> <field name="MOTOR_REVERSE">OFF</field> <field name="MOTOR_DRIVE">RIGHT</field> </block> </value> <value name="MC"> <block type="robBrick_motor_big" id="7" intask="true"> <field name="MOTOR_REGULATION">TRUE</field> <field name="MOTOR_REVERSE">OFF</field> <field name="MOTOR_DRIVE">LEFT</field> </block> </value> </block> </instance> </block_set></config></export>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment