Qwiic_RFID_Py  2.1.1
Python for SFE Qwiic RFID
Loading...
Searching...
No Matches
qwiic_rfid.QwiicRFID Class Reference

QwiicRFID. More...

Inheritance diagram for qwiic_rfid.QwiicRFID:

Public Member Functions

def __init__ (self, address=None, i2c_driver=None)
 
def is_connected (self)
 Determine if a Qwiic RFID device is connected to the system. More...
 
def begin (self)
 Initialize the operation of the Qwiic GPIO. More...
 
def get_tag (self)
 Gets the current RFID tag. More...
 
def get_req_time (self)
 Gets the time when when RFID tag was last scanned. More...
 
def get_prec_req_time (self)
 Gets the time when the RFID tag was last scanned. More...
 
def clear_tags (self)
 Reads and clears the tags from the buffer. More...
 
def get_all_tags (self, tag_array)
 Gets all the tags in the buffer. More...
 
def get_all_prec_times (self, time_array)
 Gets all times in the buffer. More...
 
def change_address (self, new_address)
 Changes the I2C address of the Qwiic RFID reader. More...
 

Public Attributes

 address
 

Static Public Attributes

 device_name = _DEFAULT_NAME
 
 available_addresses = _AVAILABLE_I2C_ADDRESS
 
int ALTERNATE_ADDR = 0x7C
 
int ADDRESS_LOCATION = 0xC7
 
int TAG_AND_TIME_REQUEST = 10
 
int MAX_TAG_STORAGE = 20
 
int BYTES_IN_BUFFER = 4
 
 RFID_TAG = None
 
 RFID_TIME = None
 
list TAG_ARRAY = [None] * MAX_TAG_STORAGE
 
list TIME_ARRAY = [None] * MAX_TAG_STORAGE
 

Detailed Description

QwiicRFID.

Parameters
addressThe I2C address to use for the device. If not provied, the default address is used.
i2c_driverAn existing i2c driver object. If not provided a driver object is created.
Returns
Object The RFID device object.

Constructor & Destructor Documentation

◆ __init__()

def qwiic_rfid.QwiicRFID.__init__ (   self,
  address = None,
  i2c_driver = None 
)

Member Function Documentation

◆ begin()

def qwiic_rfid.QwiicRFID.begin (   self)

Initialize the operation of the Qwiic GPIO.

Returns
void Returns true if the initialization was successful, otherwise False.

◆ change_address()

def qwiic_rfid.QwiicRFID.change_address (   self,
  new_address 
)

Changes the I2C address of the Qwiic RFID reader.

Parameters
new_addressthe new address to set the RFID reader to
Returns
bool False if the address is out of range

◆ clear_tags()

def qwiic_rfid.QwiicRFID.clear_tags (   self)

Reads and clears the tags from the buffer.

◆ get_all_prec_times()

def qwiic_rfid.QwiicRFID.get_all_prec_times (   self,
  time_array 
)

Gets all times in the buffer.

Parameters
time_arraylist of upto 20 times the RFID tag was read from the I2C bus

◆ get_all_tags()

def qwiic_rfid.QwiicRFID.get_all_tags (   self,
  tag_array 
)

Gets all the tags in the buffer.

Parameters
tag_arraylist of upto 20 RFID tag numbers

◆ get_prec_req_time()

def qwiic_rfid.QwiicRFID.get_prec_req_time (   self)

Gets the time when the RFID tag was last scanned.

Returns
int Returns time in seconds

◆ get_req_time()

def qwiic_rfid.QwiicRFID.get_req_time (   self)

Gets the time when when RFID tag was last scanned.

Returns
int Returns time in seconds

◆ get_tag()

def qwiic_rfid.QwiicRFID.get_tag (   self)

Gets the current RFID tag.

Returns
string Returns the RFID tag

◆ is_connected()

def qwiic_rfid.QwiicRFID.is_connected (   self)

Determine if a Qwiic RFID device is connected to the system.

Returns
void True if the device is connected, otherwise False.

Member Data Documentation

◆ address

qwiic_rfid.QwiicRFID.address

◆ ADDRESS_LOCATION

int qwiic_rfid.QwiicRFID.ADDRESS_LOCATION = 0xC7
static

◆ ALTERNATE_ADDR

int qwiic_rfid.QwiicRFID.ALTERNATE_ADDR = 0x7C
static

◆ available_addresses

qwiic_rfid.QwiicRFID.available_addresses = _AVAILABLE_I2C_ADDRESS
static

◆ BYTES_IN_BUFFER

int qwiic_rfid.QwiicRFID.BYTES_IN_BUFFER = 4
static

◆ device_name

qwiic_rfid.QwiicRFID.device_name = _DEFAULT_NAME
static

◆ MAX_TAG_STORAGE

int qwiic_rfid.QwiicRFID.MAX_TAG_STORAGE = 20
static

◆ RFID_TAG

qwiic_rfid.QwiicRFID.RFID_TAG = None
static

◆ RFID_TIME

qwiic_rfid.QwiicRFID.RFID_TIME = None
static

◆ TAG_AND_TIME_REQUEST

int qwiic_rfid.QwiicRFID.TAG_AND_TIME_REQUEST = 10
static

◆ TAG_ARRAY

list qwiic_rfid.QwiicRFID.TAG_ARRAY = [None] * MAX_TAG_STORAGE
static

◆ TIME_ARRAY

list qwiic_rfid.QwiicRFID.TIME_ARRAY = [None] * MAX_TAG_STORAGE
static

The documentation for this class was generated from the following file: