@CrossRoads
I think you mean header files, and yes there is a #include "SoftwareSerial.h" missing. As well it should be, since SoftwareSerial is obsolete.
maker007 should be using NewSoftSerial, instead.
void loop()
{
SoftwareSerial RFID = SoftwareSerial(rxPin,txPin);
RFID.begin(2400);
Why do you want to create a new instance on every pass through loop?
if((val = RFID.read()) == 10)
{ // check for header
if(switchVal == HIGH){
Serial.println("Button");
moveServo();
}
If the end of the tag data was read, and the switch is held down move the servo.
if((bytesread == 10) && (findGoodTag()))
{ // if 10 digit read is complete
digitalWrite(enable, HIGH); // dectivate the RFID reader
moveServo();
delay(500);
digitalWrite(enable, LOW); // Activate the RFID reader
}
If the end of the tag data was read, and the tag is good, move the servo.
Two questions. Why are you moving the servo in the first block of code, even if the tag was not valid?
Why are you turning the RFID read off and on?
I lied. I have 3 questions. Is your tab key broken, or is the complete lack of indenting a copy/paste issue, or don't you understand the benefits of proper indenting?
OK, so that was three questions, for a total of 5. Oh, well...
char tag1[11] = "0800335036"; // this is size 11 because it is a NULL terminating string
char tag2[11] = "0800330A99";
char tag3[11] = "0F03028B4F";
When declaring and initializing in one step, the compiler will determine the size that the array needs to be. You do not have to explicitly set the size.