<xml xmlns="https://developers.google.com/blockly/xml">
<description>
<![CDATA[

## Velocity of Sound

<img  class="ui image fluid"  src='data:image/svg+xml;base64,[encoded data, 8660 characters]'/>

- Connect the buzzer from WG to ground
- Connect WG to A2 for monitoring
- Connect the mic to the MIC input 

Keep the microphone in front of the buzzer to get a good signal. Adjust the distance between the buzzer and microphone to make the two
signals in phase. Mark the position, move it away to make the two signals out of phase. The distance moved will be half wave length.
velocity = 2 x D x frequency
 
Sound waves are longitudinal, it is a series of low pressure and high pressure regions. In this experiment a Piezo buzzer makes a single frequency sound.
A microphone kept in front of it gives a sine wave output. If we keep another microphone at a distance of half wave length away from the first one
the two outputs will be 180 degree out of phase. The reason is that when the first one is at a high pressure region the second one
will be at the low pressure region. There is no need of two microphones when we have the signal that drives the Piezo buzzer. 


]]>

</description>	
  <variables>
    <variable id="p2;|y@rv#%f/+bN}(kds">timestamps</variable>
    <variable id="qIsUPRU,p*.[t8B]q/x{">data1</variable>
    <variable id="0uH*MyPf(EpwI:lYH|0:">data2</variable>
  </variables>
  <block type="scope_trigger" id="Bs;iWhs)b5s-4a-U)aEE" x="92" y="60">
    <field name="STATE">TRUE</field>
    <field name="CHANNEL">0</field>
    <field name="LEVEL">512</field>
    <next>
      <block type="set_frequency" id="7=yKW7jMZ5rg?]9.7ht5">
        <field name="CHANNEL">WG</field>
        <value name="FREQUENCY">
          <block type="math_number" id="gtb2CS$aYK}cSKVmdxdh">
            <field name="NUM">3000</field>
          </block>
        </value>
        <next>
          <block type="set_frequency_slider" id=",En9@BI]OxM~IxOyf#Jv">
            <field name="CHANNEL">WG</field>
            <next>
              <block type="controls_whileUntil" id="f`J1|UIOHO^4GdlbXdM3">
                <field name="MODE">WHILE</field>
                <value name="BOOL">
                  <block type="logic_boolean" id="7Q|PR^vb%adLe^)r|#/{">
                    <field name="BOOL">TRUE</field>
                  </block>
                </value>
                <statement name="DO">
                  <block type="capture2" id="MqLULFRTbTZtDTK(zBb6">
                    <field name="CHANNEL">MIC</field>
                    <field name="SAMPLES">300</field>
                    <field name="TIMEGAP">2</field>
                    <field name="TIMESTAMPS" id="p2;|y@rv#%f/+bN}(kds">timestamps</field>
                    <field name="DATA1" id="qIsUPRU,p*.[t8B]q/x{">data1</field>
                    <field name="DATA2" id="0uH*MyPf(EpwI:lYH|0:">data2</field>
                    <next>
                      <block type="plot_xyyarray" id="4!9|Y}qRN646Os)n{oj8">
                        <value name="X">
                          <block type="variables_get" id="*)-Yw`WIQb_4x#pMCZ|]">
                            <field name="VAR" id="p2;|y@rv#%f/+bN}(kds">timestamps</field>
                          </block>
                        </value>
                        <value name="Y1">
                          <block type="variables_get" id=",etregY@y$na@c62Wt`w">
                            <field name="VAR" id="qIsUPRU,p*.[t8B]q/x{">data1</field>
                          </block>
                        </value>
                        <value name="Y2">
                          <block type="variables_get" id="ZN}Mp*UY6Le.8m,ai{Jv">
                            <field name="VAR" id="0uH*MyPf(EpwI:lYH|0:">data2</field>
                          </block>
                        </value>
                        <next>
                          <block type="wait_seconds" id="+P~z=}a]X_9]ii]C18.4">
                            <field name="SECONDS">0.1</field>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </next>
          </block>
        </next>
      </block>
    </next>
  </block>
</xml>
