<xml xmlns="https://developers.google.com/blockly/xml">
  <block type="controls_whileUntil" id="X+U^Ux|)3=B[VEOi!!~h" x="-114" y="-527">
    <field name="MODE">UNTIL</field>
    <value name="BOOL">
      <block type="check_for_obstacle" id="!ZO)285B)]=]N{eYyyZR"></block>
    </value>
    <statement name="DO">
      <block type="controls_if" id="~BpxZ_I^(P8*AxN6{;|X">
        <mutation elseif="3"></mutation>
        <value name="IF0">
          <block type="logic_operation" id="3/CRnA(]*QTvS;m(i:F~">
            <field name="OP">AND</field>
            <value name="A">
              <block type="logic_compare" id="!2FF#5jri~Ry5DiNUkpQ">
                <field name="OP">NEQ</field>
                <value name="A">
                  <block type="floor_sensor" id="v;J^vqZ,z5gU@JrOV23@">
                    <field name="floor_sensor_option">3</field>
                  </block>
                </value>
                <value name="B">
                  <block type="math_number" id="(e%Vm/E3}0z-hgM%h@wE">
                    <field name="NUM">0</field>
                  </block>
                </value>
              </block>
            </value>
            <value name="B">
              <block type="logic_compare" id="6S*IqN[1Qtf?NqnF6Y_f">
                <field name="OP">NEQ</field>
                <value name="A">
                  <block type="floor_sensor" id=":EDp5~A5/+aBYpM0ErB`">
                    <field name="floor_sensor_option">2</field>
                  </block>
                </value>
                <value name="B">
                  <block type="math_number" id="P.9{p]PsorrS#90C|18y">
                    <field name="NUM">0</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </value>
        <statement name="DO0">
          <block type="move_forward" id="rJH=_(3ZL3uLigRa~.Js"></block>
        </statement>
        <value name="IF1">
          <block type="logic_operation" id=";pX{P:SH8gGl|58PA_qm">
            <field name="OP">AND</field>
            <value name="A">
              <block type="logic_compare" id="7sHi+XHURV,`0Olj|OKO">
                <field name="OP">NEQ</field>
                <value name="A">
                  <block type="floor_sensor" id="4X-Vqv2NUUB$g$H=0zKV">
                    <field name="floor_sensor_option">3</field>
                  </block>
                </value>
                <value name="B">
                  <block type="math_number" id="$`**cc](GaQx06;^j{e~">
                    <field name="NUM">0</field>
                  </block>
                </value>
              </block>
            </value>
            <value name="B">
              <block type="logic_compare" id="YK,hn?UM!F+U{kqk|G79">
                <field name="OP">EQ</field>
                <value name="A">
                  <block type="floor_sensor" id="UB`?Q|5pX!IwOqu5rpVM">
                    <field name="floor_sensor_option">2</field>
                  </block>
                </value>
                <value name="B">
                  <block type="math_number" id="AlRdSG;EJjtR^yAy~7gW">
                    <field name="NUM">0</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </value>
        <statement name="DO1">
          <block type="transmit" id="wL^c4ooj25aoy:]|B*6y">
            <value name="for_print">
              <block type="text" id="s:`/zYWs2SDUg-2@bz6_">
                <field name="TEXT">Edge detected on the right, moving backwards!</field>
              </block>
            </value>
            <next>
              <block type="move_reverse_distance" id="igH9L4lh+:O.}k)3q3hS">
                <field name="number_of_steps">15</field>
                <next>
                  <block type="turn_left_90" id="lFU9`)bh466SBd,}l87%">
                    <next>
                      <block type="turn_left" id="UqEjl@!y~vHFYWA0Djkz"></block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </statement>
        <value name="IF2">
          <block type="logic_operation" id="b^Um2_Ujm+6@t@idXhU;">
            <field name="OP">AND</field>
            <value name="A">
              <block type="logic_compare" id="(U^Mg55gmcxh|k.x:G9B">
                <field name="OP">EQ</field>
                <value name="A">
                  <block type="floor_sensor" id="gGcRB{-,T:,G`=km/ua[">
                    <field name="floor_sensor_option">3</field>
                  </block>
                </value>
                <value name="B">
                  <block type="math_number" id="t(Q(eD[8wY/VCV7rg(3{">
                    <field name="NUM">0</field>
                  </block>
                </value>
              </block>
            </value>
            <value name="B">
              <block type="logic_compare" id="rL0X%PAcyU6uxKuR!8h.">
                <field name="OP">NEQ</field>
                <value name="A">
                  <block type="floor_sensor" id="RdQ.]i9uF7~EnX-a=PWV">
                    <field name="floor_sensor_option">2</field>
                  </block>
                </value>
                <value name="B">
                  <block type="math_number" id="9]%Q!|pD;Zo=$Z9;VY8C">
                    <field name="NUM">0</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </value>
        <statement name="DO2">
          <block type="transmit" id="~uTnK[]{?1vnM036z;13">
            <value name="for_print">
              <block type="text" id="~R?w3s(8%FCex{(WfLOf">
                <field name="TEXT">Edge detected on the left, moving backwards!</field>
              </block>
            </value>
            <next>
              <block type="move_reverse_distance" id="EMV+iRkYOBmhsC:taDQF">
                <field name="number_of_steps">15</field>
                <next>
                  <block type="turn_right_90" id="On2_u%Q*,g{,%,Pth~.q"></block>
                </next>
              </block>
            </next>
          </block>
        </statement>
        <value name="IF3">
          <block type="logic_operation" id="NA/=%h:/2HA6;#CT|i=A">
            <field name="OP">AND</field>
            <value name="A">
              <block type="logic_compare" id="W@%MX_{NxKp~c80JhuMc">
                <field name="OP">EQ</field>
                <value name="A">
                  <block type="floor_sensor" id="!{u/.V~..,s[={bzjVhk">
                    <field name="floor_sensor_option">3</field>
                  </block>
                </value>
                <value name="B">
                  <block type="math_number" id="wd*cT7ud^O;zxVUPW[#8">
                    <field name="NUM">0</field>
                  </block>
                </value>
              </block>
            </value>
            <value name="B">
              <block type="logic_compare" id="gkkCXfy0A7.ne)j=#:K.">
                <field name="OP">EQ</field>
                <value name="A">
                  <block type="floor_sensor" id=",~Yo2TAR3KSCz?Mv~oRO">
                    <field name="floor_sensor_option">2</field>
                  </block>
                </value>
                <value name="B">
                  <block type="math_number" id="a]~np[Wm5E.tUb4n;8{J">
                    <field name="NUM">0</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </value>
        <statement name="DO3">
          <block type="transmit" id="kR1XzZ4N8*5)o7}dPF)V">
            <value name="for_print">
              <block type="text" id="OIXL+FrCTELTT=iyD;d7">
                <field name="TEXT">Edge detected, moving backwards!</field>
              </block>
            </value>
            <next>
              <block type="move_reverse_distance" id="iKml(}5gCfiBS9Uz5@z:">
                <field name="number_of_steps">15</field>
                <next>
                  <block type="turn_left_90" id="RpIwB#o[+gS@CVa@dtd?"></block>
                </next>
              </block>
            </next>
          </block>
        </statement>
      </block>
    </statement>
  </block>
  <project>
    <title>Edge detection</title>
    <description>Edge detection and safe robot navigation.</description>
  </project>
</xml>