<xml xmlns="https://developers.google.com/blockly/xml">
  <variables>
    <variable id="(eG:3Li8hL6{B*coh|%{">height</variable>
  </variables>
  <block type="set_reg" id="(Y4?g9P%9Kq/k0/1#U49" x="24" y="-391">
    <field name="REGISTER">DDRB</field>
    <value name="VALUE">
      <shadow type="math_number" id="m55h^Q2b2wcCy^vI/G/)">
        <field name="NUM">255</field>
      </shadow>
    </value>
    <next>
      <block type="add_mp_hands" id="PmpiSG1J7]?u]Qn0x`6A">
        <field name="CAM">front</field>
        <next>
          <block type="add_game" id="3YCPo!vOJS|o7/NBf9#[">
            <next>
              <block type="controls_whileUntil" id="{_DYrgvpuQ]o4DNAL(@c">
                <field name="MODE">WHILE</field>
                <value name="BOOL">
                  <shadow type="logic_boolean" id="$:VeO#~_9=s}L[+8i)nP">
                    <field name="BOOL">TRUE</field>
                  </shadow>
                </value>
                <statement name="DO">
                  <block type="controls_if" id="K+ZV~+Y14@?0=peOQVtl">
                    <value name="IF0">
                      <block type="ai_isHandAvailable" id="%Z`jR$L1A!{qhYi#`VX["></block>
                    </value>
                    <statement name="DO0">
                      <block type="variables_set" id="_7zX2{OAM)%2nV1uq|00">
                        <field name="VAR" id="(eG:3Li8hL6{B*coh|%{">height</field>
                        <value name="VALUE">
                          <block type="math_arithmetic" id="bxX+.6.-Mea/_I|nK(:]">
                            <field name="OP">MULTIPLY</field>
                            <value name="A">
                              <shadow type="math_number" id="M3ty:b[3c|X8FDz740HX">
                                <field name="NUM">4</field>
                              </shadow>
                            </value>
                            <value name="B">
                              <shadow type="math_number" id="DV.Iq`Mh[$.DMy[h2}xW">
                                <field name="NUM">1</field>
                              </shadow>
                              <block type="ai_distance" id="@G,9avKwi6w3KtnJw?1U">
                                <field name="finger_joint_1">4</field>
                                <field name="finger_joint_2">8</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <next>
                          <block type="set_bird_y" id="Wl.)ky-Wt!w[_:zKLo#L">
                            <value name="Y">
                              <shadow type="math_number" id="S~pg(N]Su,l~c-0Rl9*m">
                                <field name="NUM">200</field>
                              </shadow>
                              <block type="variables_get" id="zI_Fr`@g#$9C4I8yx(AN">
                                <field name="VAR" id="(eG:3Li8hL6{B*coh|%{">height</field>
                              </block>
                            </value>
                            <next>
                              <block type="controls_if" id="fdA#`M#ZMsi2lsT/qm!7">
                                <mutation else="1"></mutation>
                                <value name="IF0">
                                  <block type="logic_compare" id="M=jlPT|/?Q0thR@ZlMSE">
                                    <field name="OP">GT</field>
                                    <value name="A">
                                      <block type="variables_get" id="b:B-8g=p,N.6$/$rqU.j">
                                        <field name="VAR" id="(eG:3Li8hL6{B*coh|%{">height</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="math_number" id="sas#f`)EBwM{tk[VL-~a">
                                        <field name="NUM">500</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO0">
                                  <block type="set_reg" id="pB,#d0WeM0,pU|,IC9^h">
                                    <field name="REGISTER">PORTB</field>
                                    <value name="VALUE">
                                      <shadow type="math_number" id="Qm7^;;c~w!mF;uKM#SKA">
                                        <field name="NUM">255</field>
                                      </shadow>
                                    </value>
                                  </block>
                                </statement>
                                <statement name="ELSE">
                                  <block type="set_reg" id="%mE%i:snSG0GtkaH@`c8">
                                    <field name="REGISTER">PORTB</field>
                                    <value name="VALUE">
                                      <shadow type="math_number" id="1ZZ+Y55ysZclmhaN{L8,">
                                        <field name="NUM">0</field>
                                      </shadow>
                                    </value>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </statement>
                    <next>
                      <block type="wait_seconds" id="UU%OX4Rl^X!wa.N|v4*+">
                        <field name="SECONDS">0.01</field>
                      </block>
                    </next>
                  </block>
                </statement>
                <next>
                  <block type="stop_game" id="csu/*}K@-iRufK-do++G"></block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </next>
  </block>
<description>
<![CDATA[<h2>Bird game</h2><p>Tilt your phone up and down to move the bird up/Down.</p><p>addGame: Create a game set bird altitude; The height of the bird from the floor of the game box is set to the input number. It should be between 0(floor), and 1000(Roof)</p><p>Your phone has a built in rotation sensor.</p><p>The rotation values are between -1 and 1</p><p>These readings are measured and scaled to 0 to 1000 range by using basic arithmetic operators, and are then used to set the height of the character in the game.</p><p>Tilt your phone up and down to move the bird up/Down.</p>]]>
</description>
</xml>
