<xml xmlns="https://developers.google.com/blockly/xml">
  <variables>
    <variable id="+kMhFXD_e]2hR(JXEv|,">data</variable>
  </variables>
  <block type="mqtt_connect" id="c?-Iux/(B4NR0M*RqZ!m" x="323" y="-20">
    <field name="NAME">ALICE</field>
    <next>
      <block type="mqtt_subscribe" id="(`))MuLQ2x+-n^z0`BJy">
        <field name="CHANNEL">BOB/GRAVITY</field>
        <next>
          <block type="controls_whileUntil" id="+rpBwe3s@B=p}Dnu!!P%">
            <field name="MODE">WHILE</field>
            <value name="BOOL">
              <shadow type="logic_boolean" id="P%U11roWRAG?-WJ|I/f1">
                <field name="BOOL">TRUE</field>
              </shadow>
            </value>
            <statement name="DO">
              <block type="controls_whileUntil" id="p[=fal-%dsq2~^oI=eDs">
                <field name="MODE">WHILE</field>
                <value name="BOOL">
                  <shadow type="logic_boolean" id="/7CA+S8Qh$YM9d:9%F;e">
                    <field name="BOOL">TRUE</field>
                  </shadow>
                  <block type="mqtt_hasdata" id="C7~jwyCZFqT3V/=Fv0xp">
                    <field name="CHANNEL">BOB/GRAVITY</field>
                  </block>
                </value>
                <statement name="DO">
                  <block type="variables_set" id="lddry[d2uz{^Xi^AVMsc">
                    <field name="VAR" id="+kMhFXD_e]2hR(JXEv|,">data</field>
                    <value name="VALUE">
                      <block type="mqtt_fetchdata" id="?Ro*?=@cpV0:GeioTjk^">
                        <field name="CHANNEL">BOB/GRAVITY</field>
                      </block>
                    </value>
                    <next>
                      <block type="cs_sticker" id="|;rau9Ol]tDPH$P/Cmks">
                        <value name="LABEL">
                          <shadow type="text" id="C,)iHU_Pqi/Otbmwz31)">
                            <field name="TEXT">got</field>
                          </shadow>
                        </value>
                        <value name="TEXT">
                          <shadow type="text" id="N[Xns*0{FFz@YsgqioF8">
                            <field name="TEXT">Reading</field>
                          </shadow>
                          <block type="variables_get" id=")M:Q/IlyMNZ[zwqKW_]d">
                            <field name="VAR" id="+kMhFXD_e]2hR(JXEv|,">data</field>
                          </block>
                        </value>
                      </block>
                    </next>
                  </block>
                </statement>
                <next>
                  <block type="wait_seconds" id="S#Y~[+6:SnsYbVK(%g5t">
                    <field name="SECONDS">0.1</field>
                  </block>
                </next>
              </block>
            </statement>
          </block>
        </next>
      </block>
    </next>
  </block>
<description>
<![CDATA[<h2>Received data from internet connected devices </h2><p><br></p><p><img src="data:image/jpeg;base64,[encoded data, 66224 characters]"></p><p>This will subscribe to BOB/GRAVITY, and continuously check if data is available in that channel.</p><p><br></p><p>If data is available, it will fetch it and display it. You can also plot it.</p><p><br></p><h2>For transmitting data, run the IoT Send Data demo from another phone. </h2><p><img src="data:image/jpeg;base64,[encoded data, 50672 characters]"></p><p><br></p>]]>
</description>
</xml>
