BS2 and RFID Reader.... How to know when the reader is inactive
Jeff_5_
Posts: 36
ok so i have a parallax rfid reader hooked into my basic stamp. I read my tags in the the VAR buf. My question is how can i determine when the reader is not reading a tag. My thought was to set the buf=0 and then do this piece of code.
LOWEnable 'activatethereader
SERINRX,T2400,150,Notag_,[WAIT($0A),SKIP6,HEX4buf] 'waitforhdr+ID
HIGHEnable
And if my reader dosnt read a tag my buf should still equal zero. So then i can say
If(buf = 0) THEN
Debug "There is no tag in range"
Anybody know how i can do this.
LOWEnable 'activatethereader
SERINRX,T2400,150,Notag_,[WAIT($0A),SKIP6,HEX4buf] 'waitforhdr+ID
HIGHEnable
And if my reader dosnt read a tag my buf should still equal zero. So then i can say
If(buf = 0) THEN
Debug "There is no tag in range"
Anybody know how i can do this.
Comments
The "Notag_" part is the name of a subroutine that the program jumps to if the tag reading times out. The "150" before it is the time in milliseconds that it waits to read a tag before making the jump. If a tag is read then the jump is not made.
Rich H
can i just go
NotTag:
debug "There is no tag in range"
See if this works;
Rich H