RFID Tag - Credit Card Datasheet
1023_1_Product_Manual created: 10/12/07 Page 7
rd.Antenna = true;
rd.LED = true;
//keep waiting and outputting events until keyboard input is entered
Console.WriteLine(“Press any key to end...”);
Console.Read();
//turn off the led
rd.LED = false;
//close the phidget and dispose of the object
rd.close();
rd = null;
Console.WriteLine(“ok”);
}
catch (PhidgetException ex)
{
Console.WriteLine(ex.Description);
}
}
//attach event handler...display the serial number of the attached RFID phidget
static void rd_Attach(object sender, AttachEventArgs e)
{
Console.WriteLine(“RFID reader {0} attached!”, e.Device.SerialNumber.ToString());
}
//detach event handler...display the serial number of the detached RFID phidget
static void rd_Detach(object sender, DetachEventArgs e)
{
Console.WriteLine(“RFID reader {0} detached!”, e.Device.SerialNumber.ToString());
}
//Error event handler...display the error description string
static void rd_Error(object sender, ErrorEventArgs e)
{
Console.WriteLine(e.Description);
}
//Print the tag code of the scanned tag
static void rd_Tag(object sender, TagEventArgs e)
{
Console.WriteLine(“Tag {0} scanned”, e.Tag);
}
//print the tag code for the tag that was just lost
static void rd_TagLost(object sender, TagEventArgs e)
{
Console.WriteLine(“Tag {0} lost”, e.Tag);
}
}
}
Learning more ...
check out the • forums
check out the Phidgets projects •