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

## Writing to a file

+ All files are stored under Documents/SEELab3
+ Select the 'Print To File' block from the expeyes menu
+ Specify a filename, and attach any variable to the block's input
+ If checked, the newline checkbox inserts a newline character after every line so that your results appear properly formatted in a single column. 

## Description of the program

100 Voltage values are read from A1 and stored into a file called voltages.txt

<img class="ui fluid image" src='data:image/jpeg;base64,[encoded data, 18684 characters]'/>


]]>

</description> 
 
      <variables>
        <variable id="hFT`T6F(Qq$Y*Egy^K31">myval</variable>
      </variables>
      <block type="controls_repeat_ext" id=",C%r5nZGnQ|4+T6e/^?e" x="6" y="-202">
        <value name="TIMES">
          <shadow type="math_number" id="F{ylvzrl)kPMN:`{4=:!">
            <field name="NUM">100</field>
          </shadow>
        </value>
        <statement name="DO">
          <block type="variables_set" id="(+RLO=.ELcCCB!eXpK1N">
            <field name="VAR" id="hFT`T6F(Qq$Y*Egy^K31">myval</field>
            <value name="VALUE">
              <block type="get_voltage" id="SHWpS$(_nzv,i%4ZE%q5">
                <field name="CHANNEL">A1</field>
              </block>
            </value>
            <next>
              <block type="plot_datapoint" id="Hb:s?vwdMXqhs4Hg:A3X">
                <value name="VALUE">
                  <block type="variables_get" id="A6maBtOK^)#M(05DBIX5">
                    <field name="VAR" id="hFT`T6F(Qq$Y*Egy^K31">myval</field>
                  </block>
                </value>
                <next>
                  <block type="write_to_file" id=".,Xm;D^=3B~]b%F^F2bj">
                    <field name="NEWLINE">TRUE</field>
                    <field name="FNAME">voltages.txt</field>
                    <value name="TEXT">
                      <block type="variables_get" id=":wuBjEl,`YLllZ)WdO1D">
                        <field name="VAR" id="hFT`T6F(Qq$Y*Egy^K31">myval</field>
                      </block>
                    </value>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </statement>
      </block>
    </xml>
