Use this program to check the ID of the RFID chips.
from time import sleep
from future import *
from sugar import *
def probeCallback():
global x
screen.fill((0, 0, 0))
screen.text(str("Place RFID Tag"),5,10,1,(0, 119, 255))
screen.text(str(RFID().uuid()),5,30,2,(0, 119, 255))
screen.refresh()
x = 0
screen.sync = 0
screen.fill((0, 0, 0))
screen.text(str("Place RFID Tag"),5,10,1,(0, 119, 255))
screen.refresh()
sleep(1)
while True:
RFID().probe(probeCallback if 'probeCallback' in dir() else None)
sleep(0.2)
Use this program to write or read data to the RFID tags. Press A to write data, press B to read data.
from future import *
import sugar
from time import sleep
rfid = sugar.RFID()
while 1:
if sensor.btnValue('a'):
rfid.write(1, 1, 'ITEM')
sleep(1)
elif sensor.btnValue('b'):
print(rfid.read(1, 1))
sleep(1)