<xml xmlns="https://bipes.net.br">
  <workspace>
    <field name="DEVICE">RPI_Pico</field>
    <field name="TIMESTAMP">1767090402762</field>
    <freeboard><![CDATA[{"version":1,"allow_edit":true,"plugins":[],"panes":[],"datasources":[],"columns":3}]]></freeboard>
    <databoard><![CDATA[{"currentWorkspace":"kvfgejtdtlhg0wfqod9","workspace:kvfgejtdtlhg0wfqod9":[]}]]></databoard> 
  </workspace>
  <block type="controls_whileUntil" id="x[SbCM+!o8^;9@;LK|@." x="-788" y="-238">
    <field name="MODE">WHILE</field>
    <value name="BOOL">
      <block type="logic_boolean" id="TW|oH}}L0,]jevrl/FOs">
        <field name="BOOL">TRUE</field>
      </block>
    </value>
    <statement name="DO">
      <block type="controls_if" id="4T;p~lJhoEz$)*uj]_-g">
        <mutation else="1"></mutation>
        <comment pinned="true" h="80" w="160">判断红外传感器触发状态，决定LED亮起</comment>
        <value name="IF0">
          <block type="gpio_get" id="-hs8-6kbnj1rRD5|#HB:">
            <comment pinned="true" h="59" w="236">红外传感器触发时高电平</comment>
            <value name="pin">
              <shadow type="pinout" id="^NrmA$^_=Zi$#bash`Ri">
                <field name="DEVICE">RPI_Pico</field>
                <field name="PIN">9</field>
              </shadow>
            </value>
            <value name="pullup">
              <shadow type="logic_boolean" id="l*Ndg:OdZ/zN_jA$qYRX">
                <field name="BOOL">TRUE</field>
              </shadow>
            </value>
          </block>
        </value>
        <statement name="DO0">
          <block type="text_print" id="P.`Iqm*zf_bu74xvsM}q">
            <value name="TEXT">
              <shadow type="text" id="70r83%+cBVwT{}C%9+x;">
                <field name="TEXT">红外传感器触发</field>
              </shadow>
            </value>
            <next>
              <block type="delay" id="_}-aO.YxCkF7[wQnS+2L">
                <field name="SCALE">sleep_ms</field>
                <value name="TIME">
                  <shadow type="math_number" id="AD}Jn/X)GJMm*5:Q(xc%">
                    <field name="NUM">200</field>
                  </shadow>
                </value>
                <next>
                  <block type="gpio_set" id="VgY+ymZDE;fQ+!1]+j1O">
                    <value name="pin">
                      <shadow type="pinout" id="try#g|;LQl9+F:Z9.ri.">
                        <field name="DEVICE">RPI_Pico</field>
                        <field name="PIN">7</field>
                      </shadow>
                    </value>
                    <value name="value">
                      <shadow type="logic_boolean" id="!fW.h-wVXmPOU`Ea3cu?">
                        <field name="BOOL">TRUE</field>
                      </shadow>
                    </value>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </statement>
        <statement name="ELSE">
          <block type="gpio_set" id="53t,EIKo1N_{L!=7-Vx]">
            <value name="pin">
              <shadow type="pinout" id="Ci6/(?$l[iRrwY[B;Ko!">
                <field name="DEVICE">RPI_Pico</field>
                <field name="PIN">7</field>
              </shadow>
            </value>
            <value name="value">
              <shadow type="logic_boolean" id="P}[AZVw_vQmB*7}dC`s_">
                <field name="BOOL">FALSE</field>
              </shadow>
            </value>
          </block>
        </statement>
      </block>
    </statement>
  </block>
</xml>