<root>
<document schema='101' license='0,43966158,7T89K8' title='' description='' target='AVR.ATMEGA.Arduino Uno PDIP' >
	<config data='' clkspd='16000000' simspd='1' usewdt='0' constif='0' />
	<plugins >
		<dll_dbg_icd enabled='0' >
			<data name='debug' value='1' />
			<data name='userpins' value='0' />
			<data name='speed' value='0' />
			<data name='usev9' value='0' />
			<data name='breaks' value='8' />
			<data name='stacks' value='8' />
			<data name='clkport' value='1' />
			<data name='clkbit' value='6' />
			<data name='dataport' value='1' />
			<data name='databit' value='7' />
			<data name='ghostype' value='0' />
			<data name='monitor' value='1' />
			<data name='ictloop' value='0' />
			<data name='ictrate' value='20000' />
			<data name='ictmask' value='0' />
		</dll_dbg_icd>
		<dll_models enabled='1' />
		<dll_upgrader enabled='1' />
		<dll_webhelp enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug />
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='0' iconpath='' />
		<component class_type='root' codename='panel' x='0' y='0' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='reset' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='MEM' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='false' type='b1' description='' isconst='1' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='ACQUA' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='GAS' type='s16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Main' description='' >
						<command class_type='output' title='Uscita' textarea='36,0,511,300' mode='1' port='1048579' mask='16' exp='1' />
						<command class_type='output' title='Uscita' textarea='36,0,511,300' mode='1' port='1048579' mask='32' exp='1' />
						<command class_type='calculation' title='Calcolo' textarea='36,0,511,300' >
							<exp exp='reset = 1' />
						</command>
						<command class_type='call' title='Chiamata Macro Componente' textarea='36,0,511,300' component='v5__webserver0' macro='Initialise' />
						<command class_type='call' title='Chiamata Macro Componente' textarea='36,0,511,300' component='v5__webserver0' macro='CreateServerSocket' >
							<argument exp='0' />
							<argument exp='0' />
							<argument exp='80' />
						</command>
						<command class_type='loop' title='Ciclo' textarea='36,0,511,300' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Chiamata Macro Componente' textarea='36,0,511,300' component='v5__adc0' macro='GetByte' >
									<return exp='GAS' />
								</command>
								<command class_type='decision' title='Decisione' textarea='36,0,511,300' exp='GAS &gt; 100' swap='0' >
									<flowline >
										<command class_type='output' title='Uscita' textarea='36,0,511,300' mode='1' port='1048579' mask='32' exp='0' />
										<command class_type='output' title='Uscita' textarea='36,0,511,300' mode='1' port='1048579' mask='16' exp='0' />
									</flowline>
									<flowline >
										<command class_type='output' title='Uscita' textarea='36,0,511,300' mode='1' port='1048579' mask='32' exp='1' />
										<command class_type='input' title='Ingresso' textarea='36,0,511,300' mode='1' port='1048579' mask='8' exp='reset' />
										<command class_type='decision' title='Decisione' textarea='36,0,511,300' exp='reset = 0' swap='0' >
											<flowline >
												<command class_type='output' title='Uscita' textarea='36,0,511,300' mode='1' port='1048579' mask='16' exp='1' />
											</flowline>
											<flowline />
										</command>
									</flowline>
								</command>
								<command class_type='input' title='Ingresso' textarea='36,0,511,300' mode='1' port='1048579' mask='4' exp='ACQUA' />
								<command class_type='decision' title='Decisione' textarea='36,0,511,300' exp='ACQUA = 1' swap='1' >
									<flowline >
										<command class_type='output' title='Uscita' textarea='36,0,511,300' mode='1' port='1048579' mask='128' exp='0' />
									</flowline>
									<flowline >
										<command class_type='output' title='Uscita' textarea='36,0,511,300' mode='1' port='1048579' mask='128' exp='1' />
									</flowline>
								</command>
								<command class_type='call' title='Chiamata Macro Componente' textarea='36,0,511,300' component='v5__webserver0' macro='CheckSocketActivity' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='14683ea8-5a08-4b3a-be2d-3dea3e17e720' vmin='2' vmaj='1' codename='v5__adc0' x='-15.6962' y='45.9439' z='0' xsz='25.1419' ysz='25.1419' zsz='18.45' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='angle_start' data='225.000000' />
					<value target='angle_sweep' data='270.000000' />
					<value target='cap_color' data='192' />
					<value target='point_color' data='16777215' />
					<value target='channel' data='0' />
					<value target='vrefvol' data='500' />
					<value target='vrefop' data='0' />
					<value target='convspd' data='3' />
					<value target='actime' data='40' />
					<value target='bits' data='10' />
					<value target='bitmul' data='0.004883' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='7fdaec78-394e-4ec9-a578-4f1a12a12076' vmin='1' vmaj='1' codename='v5__led0' x='17.1371' y='-2.05605' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTD.7' />
					<value target='polarity' data='0' />
					<value target='on_color' data='8453975' />
					<value target='show_label' data='002' />
					<value target='label_property' data='pin' />
					<value target='label_color' data='16777215' />
					<value target='label_scale' data='1.000000' />
					<value target='label_auto_scale' data='0' />
					<value target='label_position' data='003' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='7fdaec78-394e-4ec9-a578-4f1a12a12076' vmin='1' vmaj='1' codename='v5__led1' x='16.3038' y='21.9439' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTD.4' />
					<value target='polarity' data='000' />
					<value target='on_color' data='8453975' />
					<value target='show_label' data='002' />
					<value target='label_property' data='pin' />
					<value target='label_color' data='16777215' />
					<value target='label_scale' data='1.000000' />
					<value target='label_auto_scale' data='0' />
					<value target='label_position' data='003' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='e8f04af0-03d9-4b1c-83d3-9d0b1dc0f80a' vmin='1' vmaj='1' codename='v5__switch0' x='-15.6962' y='-2.05605' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTD.2' />
					<value target='polarity' data='1' />
					<value target='debounce' data='0' />
					<value target='operation' data='1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='7fdaec78-394e-4ec9-a578-4f1a12a12076' vmin='1' vmaj='1' codename='v5__led2' x='-15.3629' y='21.9439' z='-1' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTD.5' />
					<value target='polarity' data='0' />
					<value target='on_color' data='8453975' />
					<value target='show_label' data='002' />
					<value target='label_property' data='pin' />
					<value target='label_color' data='16777215' />
					<value target='label_scale' data='1.000000' />
					<value target='label_auto_scale' data='0' />
					<value target='label_position' data='003' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='9e68a715-edc2-4a98-be64-c0d02f700135' vmin='4' vmaj='1' codename='v5__webserver0' x='0.101261' y='-47.7267' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='label' data='Web Server' />
					<value target='max_channels' data='4' />
					<value target='html_source' data='000' />
					<value target='Directory' data='' />
					<value target='max_pages' data='4' />
					<value target='name1' data='index' />
					<value target='html1' data='&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Rilevamento Allarmi Gas e Acqua&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot;&gt;

function reFresh()
{
  location.reload(true)
}

window.setInterval(&quot;reFresh()&quot;,1000);

function checkGas()
{
  var gas = %GAS%;
  if(gas &gt; 100)
  {
	document.write(&apos;&lt;span class=\\&quot;style5\\&quot;&gt;&lt;b&gt;Fuga di Gas in Corso!!&lt;/b&gt;&lt;/span&gt;&apos;);
  }
  else
  {
	document.write(&apos;&lt;span class=\\&quot;style4\\&quot;&gt;&lt;b&gt;OK&lt;/b&gt;&lt;/span&gt;&apos;);
  }
}

&lt;/script&gt;

&lt;style type=&quot;text/css&quot;&gt;
.style1 {
	font-size: xx-large;
	font-weight: bold;
	color: #0000FF;
}
.style2 {font-size: medium}
.style3 {font-size: medium; font-weight: bold; color: #0000FF; }
.style4 {color: #00FF00}
.style5 {color: #FF0000}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p align=&quot;center&quot; class=&quot;style1&quot;&gt;Rilevamento Allarmi Gas e Acqua&lt;br&gt;
  &lt;br&gt;
  &lt;span class=&quot;style2&quot;&gt;System Status: &lt;span class=&quot;style4&quot;&gt;Online&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; class=&quot;style3&quot;&gt;Sytem Gas: %GAS% &lt;/p&gt;
&lt;p align=&quot;center&quot; class=&quot;style3&quot;&gt;Gas Status: &lt;script&gt; checkGas() &lt;/script&gt;&lt;/p&gt;
&lt;/body&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
function checkAcqua()
{
  var acqua = %ACQUA%;
  if(acqua  &lt; 1)
  {
                document.write(&apos;&lt;span class=\\&quot;style5\\&quot;&gt;&lt;b&gt;Allagamento in Corso!!&lt;/b&gt;&lt;/span&gt;&apos;);
  }
  else
  {
	document.write(&apos;&lt;span class=\\&quot;style4\\&quot;&gt;&lt;b&gt;OK&lt;/b&gt;&lt;/span&gt;&apos;);
  }
}

&lt;/script&gt;

&lt;style type=&quot;text/css&quot;&gt;
.style1 {
	font-size: xx-large;
	font-weight: bold;
	color: #0000FF;
}
.style2 {font-size: medium}
.style3 {font-size: medium; font-weight: bold; color: #0000FF; }
.style4 {color: #00FF00}
.style5 {color: #FF0000}
&lt;/style&gt;
&lt;/head&gt;
 
&lt;body&gt;
&lt;p align=&quot;center&quot; class=&quot;style3&quot;&gt;Sytem Acqua: %ACQUA% &lt;/p&gt;
&lt;p align=&quot;center&quot; class=&quot;style3&quot;&gt;Acqua Status: &lt;script&gt; checkAcqua() &lt;/script&gt;&lt;/p&gt;
&lt;/body&gt;
&lt;/htm' />
					<value target='name2' data='page2' />
					<value target='html2' data='&lt;html&gt;
&lt;/htm' />
					<value target='name3' data='page3' />
					<value target='html3' data='&lt;html&gt;
&lt;/htm' />
					<value target='name4' data='page4' />
					<value target='html4' data='&lt;html&gt;
&lt;/html&gt;
' />
					<value target='channel' data='000' />
					<value target='MOSI_pin' data='$PORTB.3' />
					<value target='MISO_pin' data='$PORTB.4' />
					<value target='CLK_pin' data='$PORTB.5' />
					<value target='CS_pin' data='$PORTB.2' />
					<value target='int_pin' data='$PORTB.0' />
					<value target='MosiRemap' data='' />
					<value target='MisoRemap' data='' />
					<value target='ClkRemap' data='' />
					<value target='gateway0' data='192' />
					<value target='gateway1' data='168' />
					<value target='gateway2' data='1' />
					<value target='gateway3' data='1' />
					<value target='subnet0' data='255' />
					<value target='subnet1' data='255' />
					<value target='subnet2' data='255' />
					<value target='subnet3' data='0' />
					<value target='ip0' data='192' />
					<value target='ip1' data='168' />
					<value target='ip2' data='1' />
					<value target='ip3' data='72' />
					<value target='mac0' data='0' />
					<value target='mac1' data='8' />
					<value target='mac2' data='220' />
					<value target='mac3' data='0' />
					<value target='mac4' data='0' />
					<value target='mac5' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='5c1da48f-ce54-4622-bdd9-fc812e373696' vmin='0' vmaj='1' codename='v5__switch1' x='16.7034' y='43.4738' z='0.325' xsz='0.425532' ysz='0.425532' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTD.3' />
					<value target='polarity' data='1' />
					<value target='debounce' data='50' />
					<value target='operation' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='text' codename='label1' x='-15.6962' y='33.1939' z='0' xsz='4.90909' ysz='8' zsz='0' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='Color' data='192' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='Text' data='GAS Sensor' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='text' codename='label3' x='-15.3629' y='15.4439' z='3.9' xsz='7.2' ysz='8' zsz='0' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='Color' data='192' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='Text' data='Warning' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='text' codename='label4' x='16.3038' y='15.4439' z='4.9' xsz='7.57895' ysz='8' zsz='0' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='Color' data='192' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='Text' data='Memory' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='text' codename='label7' x='18.1497' y='-11.7838' z='0.85' xsz='8' ysz='8' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='Color' data='192' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='Text' data='Flooding' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='text' codename='label5' x='-16.2892' y='-12.3914' z='0.85' xsz='8' ysz='8' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='Color' data='192' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='Text' data='Flooding' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='text' codename='label6' x='-17.7207' y='-19.6755' z='0.25' xsz='8' ysz='8' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='Color' data='192' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='Text' data='Sensor' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='shape' codename='shape2' x='-0.101261' y='-9.35161' z='0' xsz='63.9986' ysz='34.4208' zsz='0' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='Shape' data='101' />
					<value target='Color' data='-1' />
					<value target='Outline' data='0' />
					<value target='Thickness' data='1.000000' />
					<value target='Image' data='' />
					<value target='Model' data='' />
					<value target='Unit' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='shape' codename='shape1' x='0.592503' y='31.7768' z='9.25' xsz='58.9108' ysz='44.3341' zsz='0' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='Shape' data='101' />
					<value target='Color' data='-1' />
					<value target='Outline' data='0' />
					<value target='Thickness' data='1.000000' />
					<value target='Image' data='' />
					<value target='Model' data='' />
					<value target='Unit' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='text' codename='label8' x='16.7034' y='36.0696' z='1.42109e-014' xsz='8' ysz='8' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='Color' data='210' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='Text' data='Reset' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='9737364' img='' style='0' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='1' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='25' />
		<camera xe='0' ye='0' ze='125.652' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAEQEAAP4CAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
