rfidser library  v0.5
Functions for use with the Parallax RFID Card Reader - Serial.
Functions
rfidser.h File Reference

Simplifies reading Parallax Serial RFID Card Reader. More...

#include "simpletools.h"
#include "fdserial.h"

Go to the source code of this file.

Functions

rfidser * rfid_open (int soutPin, int enablePin)
 Runs the RFID card reading process in another cog.
void rfidser_close (rfidser *device)
 End RFID card monitoring/reading process and recover cog and stack memory for other purposes.
void rfid_reset (rfidser *device)
 Reset the RFID reader.
void rfid_disable (rfidser *device)
 Disable RFID reading process. Reader will ignore any cards swiped.
void rfid_enable (rfidser *device)
 Enable RFID reading process. Reader will actively scan cards swiped.
char * rfid_get (rfidser *device, int timeoutms)
 Get RFID code from serial buffer.

Detailed Description

Simplifies reading Parallax Serial RFID Card Reader.

Author
Andy Lindsay
Core Usage
Each call to rfid_open launches a serial communication process into another core.
Memory Models
Use with CMM or LMM.
Version
0.5

Function Documentation

void rfid_disable ( rfidser *  device)

Disable RFID reading process. Reader will ignore any cards swiped.

Parameters
*deviceDevice identifier returned by rfid_open.
void rfid_enable ( rfidser *  device)

Enable RFID reading process. Reader will actively scan cards swiped.

Parameters
*deviceDevice identifier returned by rfid_open.
char* rfid_get ( rfidser *  device,
int  timeoutms 
)

Get RFID code from serial buffer.

Parameters
*deviceDevice identifier returned by rfid_open.
timeoutmsnumber of milliseconds to wait before returning.
Returns
Pointer to string with RFID address. Returns "timed out" if no card was scanned before the timeoutms period.
rfidser* rfid_open ( int  soutPin,
int  enablePin 
)

Runs the RFID card reading process in another cog.

Parameters
soutPinPropeller I/O pin connected to RFID reader's SOUT pin.
enablePinPropeller I/O pin connected to RFID reader's /ENABLE pin.
Returns
Device identifier for use with simpletext, fdserial, and rfidser library functions.
void rfid_reset ( rfidser *  device)

Reset the RFID reader.

Parameters
*deviceDevice identifier returned by rfid_open.
void rfidser_close ( rfidser *  device)

End RFID card monitoring/reading process and recover cog and stack memory for other purposes.

Parameters
devicedevice identifier.