Counting a loop

Paul, you are making this easier and easier. The only reason I put the delay with the servo controls was to help with write functions. Any time the card was in range, my servo would vibrate in position without going to 180 or 90. I got rid of all the delay() 's and now the rfid is sensitive to the point I can hardly get a card close to it. If that's the way the water flows, then I guess I'm going down river.

@PaulS

PaulS:

  Serial.println("Looking for PN532...");

deadbolt.attach(9);
  deadbolt.write(locked);



Somehow, I fail to see the relationship between what you printed and what you do.

Deleted the serial print

  pos = deadbolt.read();

Got a short memory, huh?
[/quote]

What is wrong with this?