<root>
<document schema='101' license='1,Dev User,HJVC24' title='' description='' target='PIC16.33E.33EP256MC202' >
	<config data='!0,ffcf!10,ffff!20,ff7f!30,ff3b!40,ffff!50,ffff%0,3%4,0%5,0%14,1%15,1%16,3%20,f%24,1%25,1%26,1%27,0%30,3%32,0%35,1%36,0%40,7%46,1%47,1%50,1%51,1' clkspd='79227500' 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' />
			<data name='anlpres' value='255' />
			<data name='digmask1' value='-1' />
			<data name='digmask2' value='-1' />
		</dll_dbg_icd>
		<dll_models enabled='1' />
		<dll_upgrader enabled='1' />
		<dll_webhelp enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug />
	<ghost >
		<FK2 >
			<data name='FK2D0' port='4294967295' pin='4294967295' />
			<data name='FK2D1' port='4294967295' pin='4294967295' />
			<data name='FK2D2' port='4294967295' pin='4294967295' />
			<data name='FK2D3' port='4294967295' pin='4294967295' />
			<data name='FK2D4' port='4294967295' pin='4294967295' />
			<data name='FK2D5' port='4294967295' pin='4294967295' />
			<data name='FK2D6' port='4294967295' pin='4294967295' />
			<data name='FK2D7' port='4294967295' pin='4294967295' />
			<data name='FK2D8' port='4294967295' pin='4294967295' />
			<data name='FK2D9' port='4294967295' pin='4294967295' />
			<data name='FK2D10' port='4294967295' pin='4294967295' />
			<data name='FK2D11' port='4294967295' pin='4294967295' />
			<data name='FK2D12' port='4294967295' pin='4294967295' />
			<data name='FK2D13' port='4294967295' pin='4294967295' />
			<data name='FK2D14' port='4294967295' pin='4294967295' />
			<data name='FK2D15' port='4294967295' pin='4294967295' />
			<data name='FK2A0' port='4294967295' pin='4294967295' />
			<data name='FK2A1' port='4294967295' pin='4294967295' />
			<data name='FK2A2' port='4294967295' pin='4294967295' />
			<data name='FK2A3' port='4294967295' pin='4294967295' />
			<data name='FK2A4' port='4294967295' pin='4294967295' />
			<data name='FK2A5' port='4294967295' pin='4294967295' />
		</FK2>
		<ICD >
			<data name='AnalogPrescaleValue' value='19' />
			<data name='DigitalSampleRate' value='100000' />
			<data name='BreakpointCount' value='8' />
			<data name='CallStackDepthCount' value='8' />
			<data name='ClockPort' value='1' />
			<data name='ClockPin' value='1' />
			<data name='DataPort' value='1' />
			<data name='DataPin' value='0' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='3' />
			<data name='CalculatedCommsDelay' value='3' />
		</ICD>
		<pins >
			<digital A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
			<analog A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
		</pins>
	</ghost>
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='4770c623-65da-487b-a445-80a729f24524' 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 >
				<property name='DHT22 PIN' target='dht22pin' typeid='5' hidden='0' locked='0' info='' />
			</properties>
			<values >
				<value target='dht22pin' data='$PORTB.1' />
			</values>
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='f' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RawPress' type='u32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='ServerIP' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='20' />
					</def>
				</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='HumStr' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='20' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='PROM' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RawTemp' type='u32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='PressROM' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' >
						<array size='6' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Temperature' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='ret' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='TempStr' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='20' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='GetStr' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='200' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Humidity' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</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='InitPressure' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='temp' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='PROM' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='Initialise' />
						<command class_type='delay' title='Delay' cmdcolor='11665527' cmdcolor_sec='14390211' exp='10' type='1' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='TransmitByte' >
							<argument exp='0xEC' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='TransmitByte' >
							<argument exp='0x1E' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='Stop' />
						<command class_type='delay' title='Delay' cmdcolor='11665527' cmdcolor_sec='14390211' exp='10' type='1' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='TransmitByte' >
							<argument exp='0xEC' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='TransmitByte' >
							<argument exp='0xA6' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='Stop' />
						<command class_type='delay' title='Delay' cmdcolor='11665527' cmdcolor_sec='14390211' exp='10' type='1' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='TransmitByte' >
							<argument exp='0xED' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='ReceiveByte' >
							<return exp='.temp' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='ReceiveByte' >
							<return exp='PROM' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='Stop' />
						<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
							<exp exp='PROM = PROM | (.temp &lt;&lt; 8)' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadPressure' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='b0' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='b1' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='b2' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='TransmitByte' >
							<argument exp='0xEC' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='TransmitByte' >
							<argument exp='0x54' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='Stop' />
						<command class_type='delay' title='Delay' cmdcolor='11665527' cmdcolor_sec='14390211' exp='10' type='1' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='TransmitByte' >
							<argument exp='0xEC' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='TransmitByte' >
							<argument exp='0x00' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='Stop' />
						<command class_type='delay' title='Delay' cmdcolor='11665527' cmdcolor_sec='14390211' exp='10' type='1' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='TransmitByte' >
							<argument exp='0xED' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='ReceiveByte' >
							<return exp='.b2' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='ReceiveByte' >
							<return exp='.b1' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='ReceiveByte' >
							<return exp='.b0' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='I2C_Pressure' macro='Stop' />
						<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
							<exp exp='RawTemp = .b2' />
							<exp exp='RawTemp = RawTemp &lt;&lt; 8' />
							<exp exp='RawTemp = RawTemp | .b1' />
							<exp exp='RawTemp = RawTemp &lt;&lt; 8' />
							<exp exp='RawTemp = RawTemp | .b0' />
						</command>
						<command class_type='calculation' title='Calculation' disable='1' cmdcolor='11665527' cmdcolor_sec='14390211' >
							<exp exp='RawPress = .b2' />
							<exp exp='RawPress = RawPress &lt;&lt; 8' />
							<exp exp='RawPress = RawPress | .b1' />
							<exp exp='RawPress = RawPress &lt;&lt; 8' />
							<exp exp='RawPress = RawPress | .b0' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='DebugOsc' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='loop' title='Loop' cmdcolor='14050076' cmdcolor_sec='15910009' type='2' exp='3' >
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='Data_LED' macro='TurnOn' />
								<command class_type='delay' title='Delay' cmdcolor='11665527' cmdcolor_sec='14390211' exp='1' type='2' />
								<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='Data_LED' macro='TurnOff' />
								<command class_type='delay' title='Delay' cmdcolor='11665527' cmdcolor_sec='14390211' exp='1' type='2' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='DHT22_WaitPin' description='Returns the number of microseconds we waited for the signal to change.' >
						<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='State' type='u8' description='0=low, 1=high' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='CurrentState' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
							<exp exp='.Return = 0' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
							<exp exp='.CurrentState = dht22pin' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='14050076' cmdcolor_sec='15910009' type='0' exp='.CurrentState != .State' >
							<flowline >
								<command class_type='delay' title='Delay' cmdcolor='11665527' cmdcolor_sec='14390211' exp='1' type='0' />
								<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
									<exp exp='.Return = .Return + 1' />
								</command>
								<command class_type='decision' title='Decision' cmdcolor='14050076' cmdcolor_sec='15910009' exp='.Return = 255' swap='0' >
									<flowline >
										<command class_type='goto' title='Goto Connection Point' cmdcolor='14050076' cmdcolor_sec='15910009' labelid='0' labelname='' />
									</flowline>
									<flowline />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
									<exp exp='.CurrentState = dht22pin' />
								</command>
							</flowline>
						</command>
						<command class_type='label' title='Connection Point' cmdcolor='14050076' cmdcolor_sec='15910009' labelid='0' labelname='A' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='str' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='200' />
						</local>
						<local name='Page' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='temp' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
						<command class_type='native' title='C Code' ccode='//Setup configuration for 79.2275MHz or 39.61375MIPs using 8MHz Crystal
PLLFBD = 41;// M=43
CLKDIVbits.PLLPOST = 0;// N1=2
CLKDIVbits.PLLPRE = 0;// N2=2
OSCTUN = 0;//Tune FRC oscillator, if FRC is used

//Disable Watch Dog Timer
RCONbits.SWDTEN = 0;// Clock switching to incorporate PLL

__builtin_write_OSCCONH(0x01);// Initiate Clock Switch to FRC

// Oscillator with PLL (NOSC=0b011)
__builtin_write_OSCCONL(0x01);// Start clock switching

while(OSCCONbits.COSC != 0b001);

// Wait for Clock switch to occur
while(OSCCONbits.LOCK != 1);

/*
//USB H/W initialization for 70 MIPs
ACLKCON3 = 0x24C1;
ACLKDIV3 = 0x7;// Wait for PLL to lock
ACLKCON3bits.ENAPLL = 1;
while(ACLKCON3bits.APLLCK != 1);
*/' cmdcolor='15232' cmdcolor_sec='6594532' language='C' />
						<command class_type='call' title='Call Macro' cmdcolor='56575' cmdcolor_sec='13430527' macro='DebugOsc' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='EN_WIFI' macro='TurnOn' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='WLAN_ESP8266' macro='Initialise' />
						<command class_type='delay' title='Delay' cmdcolor='11665527' cmdcolor_sec='14390211' exp='2' type='2' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='WLAN_ESP8266' macro='DisconnectFromSSID' />
						<command class_type='delay' title='Delay' cmdcolor='11665527' cmdcolor_sec='14390211' exp='2' type='2' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='WLAN_ESP8266' macro='ConnectToSSID' >
							<argument exp='&quot;SSID&quot;' />
							<argument exp='&quot;PWORD&quot;' />
							<argument exp='4' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='11665527' cmdcolor_sec='14390211' exp='2' type='2' />
						<command class_type='native' title='C Code' ccode='FCD_01211_CircularBuffer1__FlushBuffer();' cmdcolor='15232' cmdcolor_sec='6594532' language='C' />
						<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='WLAN_ESP8266' macro='CheckTCPServerIP' />
						<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
							<exp exp='ServerIP = &quot;192.168.1.120&quot;' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='14050076' cmdcolor_sec='15910009' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Call Macro' cmdcolor='56575' cmdcolor_sec='13430527' macro='ReadDHT22' />
								<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
									<exp exp='f = Temperature / 10.0' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
									<exp exp='TempStr = FloatToString$ (f)' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
									<exp exp='f = Humidity / 10.0' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
									<exp exp='HumStr = FloatToString$ (f)' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='WLAN_ESP8266' macro='ClientConnect' >
									<argument exp='0' />
									<argument exp='&quot;192.168.1.120&quot;' />
									<argument exp='80' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
									<exp exp='GetStr = &quot;GET /projects/ESP8266/index.php?p=PutData&amp;temp=&quot;' />
									<exp exp='GetStr = GetStr + TempStr' />
									<exp exp='GetStr = GetStr + &quot;&amp;hum=&quot;' />
									<exp exp='GetStr = GetStr + HumStr' />
									<exp exp='GetStr = GetStr + &quot; HTTP/1.1\r\nHost: &quot;' />
									<exp exp='GetStr = GetStr + ServerIP' />
									<exp exp='GetStr = GetStr + &quot;\r\n\r\n&quot;' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='WLAN_ESP8266' macro='ClientSendRequest' >
									<argument exp='GetStr' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='WLAN_ESP8266' macro='GetByteWithTimeout' >
									<return exp='ret' />
								</command>
								<command class_type='loop' title='Wait for page to finish loading' cmdcolor='14050076' cmdcolor_sec='15910009' type='0' exp='ret' >
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='56575' cmdcolor_sec='13430527' component='WLAN_ESP8266' macro='GetByteWithTimeout' >
											<return exp='ret' />
										</command>
									</flowline>
								</command>
								<command class_type='comment' title='' comment='Power down here on a battery application
Power back up after delay' textarea='12,0,12,0' cmdcolor='4812195' cmdcolor_sec='11391487' />
								<command class_type='delay' title='Delay' cmdcolor='11665527' cmdcolor_sec='14390211' exp='60' type='2' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadDHT22' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='d' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='count' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='bit' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Pull data pin low' cmdcolor='11665527' cmdcolor_sec='14390211' >
							<exp exp='dht22pin = 0' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='11665527' cmdcolor_sec='14390211' exp='10' type='1' />
						<command class_type='calculation' title='Pull up data pin' cmdcolor='11665527' cmdcolor_sec='14390211' >
							<exp exp='.d = dht22pin' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='56575' cmdcolor_sec='13430527' macro='DHT22_WaitPin' >
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='56575' cmdcolor_sec='13430527' macro='DHT22_WaitPin' >
							<return exp='.d' />
							<argument exp='1' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='14050076' cmdcolor_sec='15910009' exp='.d &gt; 120' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
									<exp exp='Humidity = 111' />
									<exp exp='Temperature = 222' />
								</command>
							</flowline>
							<flowline >
								<command class_type='call' title='Call Macro' cmdcolor='56575' cmdcolor_sec='13430527' macro='DHT22_WaitPin' >
									<return exp='.d' />
									<argument exp='0' />
								</command>
								<command class_type='decision' title='Decision' cmdcolor='14050076' cmdcolor_sec='15910009' exp='.d &gt; 120' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
											<exp exp='Humidity = 111' />
											<exp exp='Temperature = 222' />
										</command>
									</flowline>
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
											<exp exp='.count = 0' />
										</command>
										<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
											<exp exp='Humidity = 0' />
											<exp exp='Temperature = 0' />
										</command>
										<command class_type='loop' title='Loop' cmdcolor='14050076' cmdcolor_sec='15910009' type='2' exp='40' >
											<flowline >
												<command class_type='call' title='Call Macro' cmdcolor='56575' cmdcolor_sec='13430527' macro='DHT22_WaitPin' >
													<argument exp='1' />
												</command>
												<command class_type='call' title='Call Macro' cmdcolor='56575' cmdcolor_sec='13430527' macro='DHT22_WaitPin' >
													<return exp='.d' />
													<argument exp='0' />
												</command>
												<command class_type='decision' title='Delay &gt; 50us' cmdcolor='14050076' cmdcolor_sec='15910009' exp='.d &gt; 35' swap='0' >
													<flowline >
														<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
															<exp exp='.bit = 1' />
														</command>
													</flowline>
													<flowline >
														<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
															<exp exp='.bit = 0' />
														</command>
													</flowline>
												</command>
												<command class_type='decision' title='Decision' cmdcolor='14050076' cmdcolor_sec='15910009' exp='.count &gt;= 16' swap='0' >
													<flowline >
														<command class_type='decision' title='Decision' cmdcolor='14050076' cmdcolor_sec='15910009' exp='.count &gt;= 32' swap='0' >
															<flowline />
															<flowline >
																<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
																	<exp exp='Temperature = Temperature | (.bit &lt;&lt; (15 - (.count - 16)))' />
																</command>
															</flowline>
														</command>
													</flowline>
													<flowline >
														<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
															<exp exp='Humidity = Humidity | (.bit &lt;&lt; (15 - .count))' />
														</command>
													</flowline>
												</command>
												<command class_type='calculation' title='Calculation' cmdcolor='11665527' cmdcolor_sec='14390211' >
													<exp exp='.count = .count + 1' />
												</command>
											</flowline>
										</command>
									</flowline>
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='e1bb4679-58ef-40dc-8d09-306ada46f7bf' vmin='7' vmaj='1' codename='WLAN_ESP8266' x='-72' y='32' z='0.755' 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='RxBufferSize' data='256' />
					<value target='ScanBufferSize' data='256' />
					<value target='ResetMode' data='001' />
					<value target='Termination' data='001' />
					<value target='UART_CHANNEL' data='001' />
					<value target='BAUD' data='009' />
					<value target='RESET' data='$PORTB.15' />
					<value target='TX' data='$PORTB.10' />
					<value target='RX' data='$PORTB.11' />
					<value target='TXRemap' data='008' />
					<value target='RXRemap' data='043' />
					<value target='PAGES' data='002' />
					<value target='TIMEOUT' data='4' />
					<value target='LineDelay' data='1' />
					<value target='name1' data='index.htm' />
					<value target='html1' data='&lt;html&gt;&lt;head&gt;&lt;title&gt;Weather Station Report&lt;/title&gt;&lt;/head&gt;&lt;body&gt;
&lt;link rel=&quot;icon&quot; href=&quot;data:,&quot;&gt;
Battery Voltage: %0&lt;BR/&gt;
Charge Voltage: %1&lt;BR/&gt;
SM Voltage: %2&lt;BR/&gt;
Light Level: %3&lt;BR/&gt;
Temperature: %4&lt;BR/&gt;
Humidity: %5&lt;BR/&gt;
Pressure: %6&lt;BR/&gt;
&lt;/body&gt;&lt;/html&gt;' />
					<value target='name2' data='config.htm' />
					<value target='html2' data='&lt;html&gt;
Config Page
&lt;/html&gt;' />
					<value target='name3' data='favicon.ico' />
					<value target='html3' data='' />
					<value target='name4' data='page4.htm' />
					<value target='html4' data='&lt;html&gt;
Page 4
&lt;/html&gt;' />
					<value target='WLAN_USE_PAGE1' data='1' />
					<value target='WLAN_USE_PAGE2' data='1' />
					<value target='WLAN_USE_PAGE3' data='0' />
					<value target='WLAN_USE_PAGE4' data='0' />
					<value target='Outgoing_Count' data='007' />
					<value target='Out_Len_0' data='10' />
					<value target='Out_Len_1' data='10' />
					<value target='Out_Len_2' data='10' />
					<value target='Out_Len_3' data='10' />
					<value target='Out_Len_4' data='10' />
					<value target='Out_Len_5' data='10' />
					<value target='Out_Len_6' data='20' />
					<value target='Out_Len_7' data='20' />
					<value target='Out_Len_8' data='20' />
					<value target='Out_Len_9' data='20' />
					<value target='Out_Len_10' data='20' />
					<value target='Out_Len_11' data='20' />
					<value target='Incoming_Count' data='000' />
					<value target='In_Len_0' data='20' />
					<value target='In_Len_1' data='20' />
					<value target='In_Len_2' data='20' />
					<value target='In_Len_3' data='20' />
					<value target='In_Len_4' data='20' />
					<value target='In_Len_5' data='20' />
					<value target='Injector' data='000' />
					<value target='label' data='WLAN' />
					<value target='MIAC' data='0' />
					<value target='RFPOWER' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='24219805-113d-4b12-b6bd-e1b0b0c33981' vmin='4' vmaj='1' codename='I2C_Pressure' x='-72' y='0' z='0.755' xsz='60' ysz='26' zsz='1.51' 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='CHANNEL' data='001' />
					<value target='BAUD_LIST' data='003' />
					<value target='SRC' data='000' />
					<value target='SMB' data='000' />
					<value target='StopDelay' data='1' />
					<value target='BAUD' data='50000' />
					<value target='SDA' data='$PORTB.9' />
					<value target='SCL' data='$PORTB.8' />
					<value target='label' data='I2C Master' />
					<value target='ScopeTraces' data='0' />
					<value target='ConsoleData' data='' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='24219805-113d-4b12-b6bd-e1b0b0c33981' vmin='4' vmaj='1' codename='I2C_RTC' x='-72' y='-32' z='0.755' xsz='60' ysz='26' zsz='1.51' 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='CHANNEL' data='002' />
					<value target='BAUD_LIST' data='003' />
					<value target='SRC' data='000' />
					<value target='SMB' data='000' />
					<value target='StopDelay' data='1' />
					<value target='BAUD' data='50000' />
					<value target='SDA' data='$PORTB.5' />
					<value target='SCL' data='$PORTB.6' />
					<value target='label' data='I2C Master' />
					<value target='ScopeTraces' data='0' />
					<value target='ConsoleData' data='' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='14683ea8-5a08-4b3a-be2d-3dea3e17e720' vmin='3' vmaj='1' codename='ADC_Battery' x='0' y='32' z='9' 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='1' >
				<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='ScopeTraces' data='0' />
					<value target='channel' data='0' />
					<value target='vrefvol' data='660' />
					<value target='vrefop' data='000' />
					<value target='convspd' data='003' />
					<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='14683ea8-5a08-4b3a-be2d-3dea3e17e720' vmin='3' vmaj='1' codename='ADC_Charge' x='24' y='32' z='9' 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='1' >
				<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='ScopeTraces' data='0' />
					<value target='channel' data='1' />
					<value target='vrefvol' data='660' />
					<value target='vrefop' data='000' />
					<value target='convspd' data='003' />
					<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='14683ea8-5a08-4b3a-be2d-3dea3e17e720' vmin='3' vmaj='1' codename='ADC_SM' x='48' y='32' z='9' 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='1' >
				<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='ScopeTraces' data='0' />
					<value target='channel' data='2' />
					<value target='vrefvol' data='660' />
					<value target='vrefop' data='000' />
					<value target='convspd' data='003' />
					<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='d92e8259-f3a8-4176-a8c4-fe7ca42b2c3f' vmin='1' vmaj='1' codename='EN_SM' x='48' y='16' z='-1.90735e-07' 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='$PORTB.13' />
					<value target='polarity' data='001' />
					<value target='on_color' data='10551200' />
					<value target='length' data='4.000000' />
					<value target='show_label' data='001' />
					<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='d92e8259-f3a8-4176-a8c4-fe7ca42b2c3f' vmin='1' vmaj='1' codename='EN_WIFI' x='-39.3' y='40' z='-1.90735e-07' 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='$PORTB.14' />
					<value target='polarity' data='001' />
					<value target='on_color' data='10551200' />
					<value target='length' data='4.000000' />
					<value target='show_label' data='001' />
					<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='fc04a65f-f03d-40c8-9f69-0d23d2daac29' vmin='1' vmaj='1' codename='SW_ALARM' x='-40' y='-32' z='5' 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='$PORTB.7' />
					<value target='polarity' data='000' />
					<value target='debounce' data='' />
					<value target='operation' data='000' />
					<value target='color' data='6908265' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='d92e8259-f3a8-4176-a8c4-fe7ca42b2c3f' vmin='1' vmaj='1' codename='RST_WIFI' x='-40' y='24' z='-1.90735e-07' 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='$PORTB.15' />
					<value target='polarity' data='001' />
					<value target='on_color' data='10551200' />
					<value target='length' data='4.000000' />
					<value target='show_label' data='001' />
					<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='Data_LED' x='16' y='-8' z='-3.85' 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='$PORTB.12' />
					<value target='polarity' data='001' />
					<value target='on_color' data='8453975' />
					<value target='show_label' data='001' />
					<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='EN_Light' x='80' y='16' z='-3.85' 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='$PORTA.4' />
					<value target='polarity' data='001' />
					<value target='on_color' data='8453975' />
					<value target='show_label' data='001' />
					<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='14683ea8-5a08-4b3a-be2d-3dea3e17e720' vmin='3' vmaj='1' codename='ADC_Light' x='80' y='32' z='9' 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='1' >
				<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='ScopeTraces' data='0' />
					<value target='channel' data='4' />
					<value target='vrefvol' data='330' />
					<value target='vrefop' data='000' />
					<value target='convspd' data='003' />
					<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='b8c43425-121c-4dfc-8a70-665973e9938b' vmin='0' vmaj='1' codename='PressureSensor1' x='16.425' y='-54.7369' z='-48.787' xsz='25' ysz='25' zsz='25' 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='cal_i2c1::CHANNEL' data='000' />
					<value target='cal_i2c1::SDA' data='$PORTB.9' />
					<value target='cal_i2c1::SCL' data='$PORTB.8' />
					<value target='cal_i2c1::BAUD_LIST' data='002' />
					<value target='cal_i2c1::BAUD' data='400000' />
					<value target='cal_i2c1::StopDel' data='0' />
				</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='0' >
		<background rgb='1973790' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='0' />
		<camera xe='0' ye='0' ze='251.213' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey0 xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey1 xe='-3.67394e-14' ye='0' ze='-300' xt='0' yt='0' zt='0' xquat='0' yquat='1' zquat='0' wquat='6.12323e-17' />
		<camerakey2 xe='0' ye='-300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.707107' yquat='0' zquat='0' wquat='0.707107' />
		<camerakey3 xe='-3.67394e-14' ye='300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-4.32978e-17' yquat='0.707107' zquat='0.707107' wquat='4.32978e-17' />
		<camerakey4 xe='-300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='0.5' zquat='0.5' wquat='0.5' />
		<camerakey5 xe='300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='-0.5' zquat='-0.5' wquat='0.5' />
		<camerakey6 xe='-173.205' ye='-173.205' ze='173.205' xt='0' yt='0' zt='0' xquat='-0.424708' yquat='0.17592' zquat='0.339851' wquat='0.820473' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA6AQAAH8DAAA' zoom='75' scrollx='0' scrolly='719' flags='0' />
		<view type='0' name='DebugOsc' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA6AQAAH8DAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='InitPressure' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA6AQAAH8DAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ReadPressure' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA6AQAAH8DAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ReadDHT22' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA6AQAAH8DAAA' zoom='70' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='DHT22_WaitPin' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA6AQAAH8DAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
