<root>
<document schema='101' license='1,Jorgen Gundorph,HQ43Q9' title='' description='' target='AVR.ATMEGA.Arduino Uno R3 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='1000' />
			<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='1' />
			<data name='ictrate' value='1000' />
			<data name='ictmask' value='-1' />
			<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 />
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='e4f14d15-4562-492c-9e74-d2e0904d0aac' 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='address' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='5' />
					</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='Switch' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='TestAddress' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='5' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='card' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Count_ID' type='u8' 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='Tag1' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Assign the ID of one of your tags' >
							<exp exp='TestAddress[0] = 254' />
							<exp exp='TestAddress[1] = 158' />
							<exp exp='TestAddress[2] = 254' />
							<exp exp='TestAddress[3] = 2' />
							<exp exp='TestAddress[4] = 164' />
						</command>
						<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='Check' >
							<return exp='card' />
						</command>
						<command class_type='decision' title='Decision' exp='card = 0' swap='0' >
							<flowline >
								<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='ReadDataBuffer' >
									<return exp='address[0]' />
									<argument exp='0' />
								</command>
								<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='ReadDataBuffer' >
									<return exp='address[1]' />
									<argument exp='1' />
								</command>
								<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='ReadDataBuffer' >
									<return exp='address[2]' />
									<argument exp='2' />
								</command>
								<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='ReadDataBuffer' >
									<return exp='address[3]' />
									<argument exp='3' />
								</command>
								<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='ReadDataBuffer' >
									<return exp='address[4]' />
									<argument exp='4' />
								</command>
								<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='Compare' >
									<return exp='card' />
									<argument exp='TestAddress[0]' />
									<argument exp='TestAddress[1]' />
									<argument exp='TestAddress[2]' />
									<argument exp='TestAddress[3]' />
									<argument exp='TestAddress[4]' />
								</command>
								<command class_type='call' title='Slet' component='lcd_I2C1' macro='Clear' />
								<command class_type='decision' title='Decision' exp='card = 0' swap='0' >
									<flowline >
										<command class_type='call' title='Kald Macro' macro='Acces' />
									</flowline>
									<flowline >
										<command class_type='call' title='Kald Macro' ccode='// Kald Macro
// Kald Macro: No_acces()
FCM_No_acces();
' macro='No_acces' />
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Tag_3' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='comment' title='' comment='Copy and paste here from Tag1 or Tag2 and change the ID' textarea='12,0,12,0' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Acces' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='&quot;Velcome ENTRE.&quot;' component='lcd_I2C1' macro='PrintString' >
							<argument exp='&quot;Velcome ENTRE.&quot;' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='Cursor' >
							<argument exp='0' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintNumber' >
							<argument exp='address[0]' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintAscii' >
							<argument exp='&apos;,&apos;' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintNumber' >
							<argument exp='address[1]' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintAscii' >
							<argument exp='&apos;,&apos;' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintNumber' >
							<argument exp='address[2]' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintAscii' >
							<argument exp='&apos;,&apos;' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintNumber' >
							<argument exp='address[3]' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintAscii' >
							<argument exp='&apos;,&apos;' />
						</command>
						<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintNumber' >
							<argument exp='address[4]' />
						</command>
						<command class_type='output' title='produktoutput' mode='1' port='1048579' mask='16' exp='1' />
						<command class_type='delay' title='forskydning' exp='2' type='2' />
						<command class_type='output' title='produktoutput' mode='1' port='1048579' mask='16' exp='0' />
						<command class_type='call' title='Slet' component='lcd_I2C1' macro='Clear' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Tag_2' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Assign the ID of one of your tags' >
							<exp exp='TestAddress[0] = 122' />
							<exp exp='TestAddress[1] = 242' />
							<exp exp='TestAddress[2] = 122' />
							<exp exp='TestAddress[3] = 18' />
							<exp exp='TestAddress[4] = 124' />
						</command>
						<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='Check' >
							<return exp='card' />
						</command>
						<command class_type='decision' title='Decision' exp='card = 0' swap='0' >
							<flowline >
								<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='ReadDataBuffer' >
									<return exp='address[0]' />
									<argument exp='0' />
								</command>
								<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='ReadDataBuffer' >
									<return exp='address[1]' />
									<argument exp='1' />
								</command>
								<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='ReadDataBuffer' >
									<return exp='address[2]' />
									<argument exp='2' />
								</command>
								<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='ReadDataBuffer' >
									<return exp='address[3]' />
									<argument exp='3' />
								</command>
								<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='ReadDataBuffer' >
									<return exp='address[4]' />
									<argument exp='4' />
								</command>
								<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='Compare' >
									<return exp='card' />
									<argument exp='TestAddress[0]' />
									<argument exp='TestAddress[1]' />
									<argument exp='TestAddress[2]' />
									<argument exp='TestAddress[3]' />
									<argument exp='TestAddress[4]' />
								</command>
								<command class_type='call' title='Slet' component='lcd_I2C1' macro='Clear' />
								<command class_type='decision' title='Decision' exp='card = 0' swap='0' >
									<flowline >
										<command class_type='call' title='Kald Macro' macro='Acces' />
									</flowline>
									<flowline >
										<command class_type='call' title='Kald Macro' macro='No_acces' />
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='No_acces' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='Clear' />
						<command class_type='call' title='&quot;No acces!&quot;' component='lcd_I2C1' macro='PrintString' >
							<argument exp='&quot;No acces!&quot;' />
						</command>
						<command class_type='delay' title='forskydning' exp='250' type='1' />
						<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='Clear' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Read_Unknown_Tag' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='input' title='Input' mode='1' port='1048579' mask='4' exp='Switch' />
						<command class_type='decision' title='Switch=1' exp='Switch = 1' swap='0' >
							<flowline >
								<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='Check' >
									<return exp='card' />
								</command>
								<command class_type='decision' title='Decision' exp='card = 0' swap='0' >
									<flowline >
										<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='ReadDataBuffer' >
											<return exp='address[0]' />
											<argument exp='0' />
										</command>
										<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='ReadDataBuffer' >
											<return exp='address[1]' />
											<argument exp='1' />
										</command>
										<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='ReadDataBuffer' >
											<return exp='address[2]' />
											<argument exp='2' />
										</command>
										<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='ReadDataBuffer' >
											<return exp='address[3]' />
											<argument exp='3' />
										</command>
										<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='ReadDataBuffer' >
											<return exp='address[4]' />
											<argument exp='4' />
										</command>
										<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='Compare' >
											<return exp='card' />
											<argument exp='TestAddress[0]' />
											<argument exp='TestAddress[1]' />
											<argument exp='TestAddress[2]' />
											<argument exp='TestAddress[3]' />
											<argument exp='TestAddress[4]' />
										</command>
										<command class_type='call' title='Slet' component='lcd_I2C1' macro='Clear' />
										<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintNumber' >
											<argument exp='address[0]' />
										</command>
										<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintAscii' >
											<argument exp='&apos;,&apos;' />
										</command>
										<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintNumber' >
											<argument exp='address[1]' />
										</command>
										<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintAscii' >
											<argument exp='&apos;,&apos;' />
										</command>
										<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintNumber' >
											<argument exp='address[2]' />
										</command>
										<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintAscii' >
											<argument exp='&apos;,&apos;' />
										</command>
										<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintNumber' >
											<argument exp='address[3]' />
										</command>
										<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintAscii' >
											<argument exp='&apos;,&apos;' />
										</command>
										<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintNumber' >
											<argument exp='address[4]' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='label' title='Forbindelses punkt' labelid='0' labelname='A' />
								<command class_type='input' title='Input' mode='1' port='1048579' mask='4' exp='Switch' />
								<command class_type='decision' title='Switch=1' exp='Switch = 1' swap='0' >
									<flowline >
										<command class_type='goto' title='Gå til forbindelse punkt' labelid='0' labelname='' />
									</flowline>
									<flowline >
										<command class_type='call' title='Clear' component='lcd_I2C1' macro='Clear' />
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='comment' title='' comment='Wiring:

RFID:          Arduino:

SDA            10 (B2)
SCK            13 (B5)
MOSI           11 (B3)
MISO           12 (B4)
Reset           9 (B1)' textarea='205,-13,205,-13' />
						<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='Start' />
						<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintString' >
							<argument exp='&quot;RFID Init &quot;' />
						</command>
						<command class_type='call' title='Call Component Macro' component='RFID_MFRC522' macro='Initialise' />
						<command class_type='call' title='Call Component Macro' component='lcd_I2C1' macro='PrintString' >
							<argument exp='&quot;OK&quot;' />
						</command>
						<command class_type='delay' title='Delay' exp='2' type='2' />
						<command class_type='call' title='Clear' component='lcd_I2C1' macro='Clear' />
						<command class_type='comment' title='' comment='To read unknown tag/card for adding these to reconice.

Activate D2 and hold the card to reader
Press reset and the ID is read out.
' textarea='12,0,12,0' />
						<command class_type='call' title='Read_Unknow_tag_card' macro='Read_Unknown_Tag' />
						<command class_type='loop' title='Loop' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Kald Macro' macro='Tag1' />
								<command class_type='call' title='Kald Macro' macro='Tag_2' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='3f8d29a6-40a6-4d5e-a254-190c86d9ebb7' vmin='0' vmaj='2' codename='RFID_MFRC522' x='8' y='40' z='-0.0176923' xsz='0.307692' ysz='0.307692' zsz='0.307692' 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='000' />
					<value target='MISO' data='$PORTB.4' />
					<value target='MOSI' data='$PORTB.3' />
					<value target='CLK' data='$PORTB.5' />
					<value target='CS' data='$PORTB.2' />
					<value target='reset' data='$PORTB.1' />
					<value target='MosiRemap' data='000' />
					<value target='MisoRemap' data='000' />
					<value target='ClkRemap' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='bcd6a955-12c6-4ed4-a22f-f16eb62e0762' vmin='1' vmaj='1' codename='lcd_I2C1' x='-24' y='40' z='4.835' xsz='0.4' ysz='0.440771' 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='Channel' data='000' />
					<value target='SDA' data='$PORTD.6' />
					<value target='SCL' data='$PORTD.7' />
					<value target='Address' data='32' />
					<value target='Rows' data='004' />
					<value target='Columns' data='020' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='7a287a58-cba5-42ad-b8a5-58694d7f678a' vmin='2' vmaj='1' codename='sw_slide_sub_pcb1' x='-32' y='16' 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='000' />
					<value target='debounce' data='10' />
					<value target='operation' data='001' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='5767167' 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='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='28' />
		<camera xe='2' ye='25' ze='122.977' xt='2' yt='25' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel3d>
	<layout >
		<view type='0' name='Tag_2' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAOwQAAFgCAAA' zoom='75' scrollx='0' scrolly='73' flags='0' />
		<view type='0' name='Tag_3' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAOwQAAFgCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Tag1' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAOwQAAFgCAAA' zoom='75' scrollx='0' scrolly='498' flags='0' />
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAOwQAAFgCAAA' zoom='75' scrollx='0' scrolly='60' flags='0' />
		<view type='0' name='Read_Unknown_Tag' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAOwQAAFgCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Acces' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAOwQAAFgCAAA' zoom='75' scrollx='0' scrolly='330' flags='0' />
		<view type='0' name='No_acces' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAOwQAAFgCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
