Hi Everyone,
I'm working on an RFID application. I've been struggling with the read range for a while, but it seems like I may have isolated the problem. In my main loop, I have two primary functions - one that looks for a valid tag and one that listens for a button press. If the valid tag is found, it opens a servo. If the button press is detected, it enters a for loop, again listening for a valid tag. The purpose of the button press is so that I can program the Arduino to a new tag.
What I've found is that the read range for the normal open-close operation is roughly 5 inches radially from the plane of the coil. However, when inside the for loop, the tag has to be within a few millimeters of the coil before it is picked up.
I'm honestly not quite sure what to make of this...is the for loop a lot slower than the loop function?
Thanks for the help,
Austin
void loop()
{
// Normal operation of food bowl
if (readTag())
{
if (checkTag())
{
openServo();
sampleTag();
closeServo();
}
}
// Operation if programming button is pressed
if (digitalRead(programmingPin) == LOW)
{
openServo();
analogWrite(programmingLED, 0);
for( ; ; )
{
if (readTag())
{
openServo();
sampleTag();
closeServo();
}
}
}
}