<xml xmlns="https://developers.google.com/blockly/xml">
  <block type="mqtt_connect" id="g47FL$1jwRN%!o^vg%aZ" x="-95" y="61">
    <field name="NAME">BOB</field>
    <next>
      <block type="controls_whileUntil" id="(;n4Ao7qP$Xay^1h]2*{">
        <field name="MODE">WHILE</field>
        <value name="BOOL">
          <shadow type="logic_boolean" id="38r#`Mfm_hgW.([k%~t!">
            <field name="BOOL">TRUE</field>
          </shadow>
        </value>
        <statement name="DO">
          <block type="mqtt_publish" id="L6PhUpP{#YoY+MBLcZR+">
            <value name="CHANNEL">
              <shadow type="text" id="{M8iMLHp#)1hm*g1Rthf">
                <field name="TEXT">BOB/GRAVITY</field>
              </shadow>
            </value>
            <value name="DATA">
              <shadow type="text" id="[q}#5#xK@21/aYFJH~F4">
                <field name="TEXT">SAMPLE</field>
              </shadow>
              <block type="get_phone_accel" id="Eg=-=I4/%t3F8)cD:E9x">
                <field name="CHANNEL">0</field>
              </block>
            </value>
            <next>
              <block type="wait_seconds" id="_iDSu*~`3*{b*_TX|(Ic">
                <field name="SECONDS">1</field>
              </block>
            </next>
          </block>
        </statement>
      </block>
    </next>
  </block>
<description>
<![CDATA[<h2>Transmit Data over the internet</h2><p><br></p><p>This uses an MQTT Server to send and receive data from other devices.</p><p><img src="data:image/jpeg;base64,[encoded data, 50672 characters]"></p><p><br></p><p>The first block connects to the server with the name BOB.</p><p>It then continuously transmits the X axis value of gravity measured by the phone, to a channel called BOB/GRAVITY .</p><p><br></p><p>Now, any other person listening to the CHANNEL called BOB/GRAVITY can read the values. </p><p><br></p><h2>Check out the IoT receive data demo on another device for viewing the transmitted data.</h2><p><img src="data:image/jpeg;base64,[encoded data, 66224 characters]"></p>]]>
</description>
</xml>