<xml xmlns="https://bipes.net.br">
  <workspace>
    <field name="DEVICE">RPI_Pico</field>
    <field name="TIMESTAMP">1767090871964</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="-837" y="-288">
    <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">
        <comment pinned="true" h="80" w="160">判断按键触发状态，决定LED亮起状态</comment>
        <value name="IF0">
          <block type="logic_negate" id="FDgL=faiZe./}Cuh+xxF">
            <value name="BOOL">
              <block type="gpio_get" id="-hs8-6kbnj1rRD5|#HB:">
                <comment pinned="true" h="59" w="236">按键没触发时高电平，用not</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>
          </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">按键触发，led翻转</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">
                    <comment pinned="true" h="80" w="160">获取并设置与led相反的电平</comment>
                    <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>
                      <block type="logic_compare" id="9iLrw^=MOv!kfpB=03Do">
                        <field name="OP">NEQ</field>
                        <value name="A">
                          <block type="gpio_get" id="K-%t05.DEKkb%Kzb3uUS">
                            <value name="pin">
                              <shadow type="pinout" id="wMSZ51Ras{2!#`jYhTr2">
                                <field name="DEVICE">RPI_Pico</field>
                                <field name="PIN">7</field>
                              </shadow>
                            </value>
                            <value name="pullup">
                              <shadow type="logic_boolean" id="ew:5!h]9)WuJRNZ{~sP6">
                                <field name="BOOL">FALSE</field>
                              </shadow>
                            </value>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_boolean" id="Li5_+q-@1=V4?$lgn;ar">
                            <field name="BOOL">TRUE</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="delay" id="j*2@(F!BKia4fi1dqlE2">
                        <field name="SCALE">sleep_ms</field>
                        <value name="TIME">
                          <shadow type="math_number" id="YFro^LD1.n*KaUEf]=N)">
                            <field name="NUM">200</field>
                          </shadow>
                        </value>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </statement>
      </block>
    </statement>
  </block>
</xml>