Mindstorms 3rd Party ROBOTC Drivers RobotC
[Home] [Download] [Submit a bug/suggestion] [ROBOTC Forums] [Blog] [Support this project]
Defines | Functions | Variables

codatech-rfid.h File Reference

Codatex RFID driver. More...

#include "drivers/common.h"

Go to the source code of this file.

Defines

#define CTRFID_I2C_ADDR   0x04
#define CTRFID_FIRM_VER   0x00
#define CTRFID_MAN_NAME   0x08
#define CTRFID_SENS_TYP   0x10
#define CTRFID_STATUS   0x32
#define CTRFID_OFFSET   0x41
#define CTRFID_CMD   0x00
#define CTRFID_BYTE1   0x01
#define CTRFID_BYTE2   0x02
#define CTRFID_BYTE3   0x03
#define CTRFID_BYTE4   0x04
#define CTRFID_BYTE5   0x05
#define CTRFID_SERIAL   0xA0
#define CTRFID_CMD_STOP   0x00
#define CTRFID_CMD_SINGLESHOT   0x01
#define CTRFID_CMD_CONTINUOUS   0x02
#define CTRFID_CMD_BOOTLOADER   0x81
#define CTRFID_CMD_STARTAPPFIRM   0x83

Functions

bool CTRFIDinit (tSensors link)
bool CTRFIDsetContinuous (tSensors link)
bool CTRFIDsetSingleShot (tSensors link)
bool CTRFIDreadTransponder (tSensors link, string &transponderID)
bool _CTRFIDsendCommand (tSensors link, ubyte command)
bool _CTRFIDsendDummy (tSensors link)
bool _CTRFIDreadStatus (tSensors link, ubyte &_status)

Variables

tByteArray CTRFID_I2CRequest
tByteArray CTRFID_I2CReply
bool CTRFIDreadContinuous [4] = {false, false, false, false}
bool CTRFIDinitialised [4] = {false, false, false, false}

Detailed Description

Codatex RFID driver.

codatech-rfid.h provides an API for the Codatex RFID sensor. Based on information given on http://www.codatex.com/picture/upload/en/RFID_I2C.pdf and on Stephen Hall and Oliver Graff previous work on this sensor.

Changelog:

Credits:

License: You may use this code as you wish, provided you give credit where its due.

THIS CODE WILL ONLY WORK WITH ROBOTC VERSION 3.59 AND HIGHER.

Author:
Sylvain CACHEUX (sylcalego@cacheux.info)
Xander Soldaat (mightor@gmail.com), version 0.2 and up
Date:
20 february 2011
Version:
0.3

Definition in file codatech-rfid.h.