Added this function:
ReaderWriterState getRWState();
Which makes it possible to trigger events like a sound.
In this example I uses a charliewing from adafruit to test the behaviour:
void loop()
{
theReaderWriter.run(); // give the application object some CPU time to do its job. This is a non-blocking function
ReaderWriterState newState = theReaderWriter.getRWState();
if (OldState != newState)
{
OldState = newState;
switch (newState)
{
case ReaderWriterState::initializing:
Serial.println("initializing");
drawSad();
break;
case ReaderWriterState::singleTagPresent:
Serial.println("single tag present");
drawSmily();
break;
case ReaderWriterState::multipleTagsPresent:
Serial.println("multiple tags present");
drawSmily();
break;
case ReaderWriterState::noTagPresent:
Serial.println("not tag present");
drawNeutral();
break;
default:
drawNeutral();
Serial.println("exeption");
break;
}
}
}
Added this function: ReaderWriterState getRWState();
Which makes it possible to trigger events like a sound.
In this example I uses a charliewing from adafruit to test the behaviour: