I’m using XBee micropython to scan I2C device (addressed) connected on the I2C bus. I able to see the SparkFun 16x2 SerLCD - RGB Text (Qwiic) (LCD-16397) showing address 0x72, but not the SparkFun RFID Qwiic Reader (SEN-15191).
Note that I was able to make the Sparkfun LCD (I2C) module works pretty well with Xbee3 micropython. I had too create a new Xbee I2C compatible library.
Is there something different in the firmware (compared to the one of the LCD) that would prevent the SparkFun RFID Qwiic Reader (SEN-15191) from working with Xbee I2C bus ? I tried with 2 different boards and 2 different RFID ID-12LA modules, but it still the same.
I added a SparkFun Qwiic Button - Red LED (BOB-15932) on the I2C bus and I was also able to get the address (0x6f) while scanning with the Xbee I2C interface. The problem persist with the SparkFun RFID Qwiic Reader (SEN-15191). I doubt that all 3 RFID boards that I’ve tried were defective. Could it be related to the firmware of the RFID Qwiic Reader ?
I’m stuck if I can’t communicate with the RFID reader… I really need your help.
What happens if you ONLY have the Qwiic reader on the I2C line with the scanner.
The RFID reader is still not detected (so nothing is detected).
Try to have the I2C line work on a low speed. Often default is 100KHz. Some devices will not work on a higher speed.
Default was 400kHz. I tried different speed (100KHz, 9.6kHz not sure they are all standard). Here is the code I used (micropython on the Xbee) :
from machine import I2C
import sys
import time
speed = 400000
#speed = 9600
#speed = 100000
print(" +-------------------------------------+")
print(" | XBee MicroPython I2C SCAN |")
print(" +-------------------------------------+\n")
print("\nPlatform:", sys.platform, "\n")
print("\nSpeed:", speed, "\n")
def scan_I2C():
# Instantiate an I2C peripheral.
i2c = I2C(1,freq=speed)
# list devices connected to the I2C interface.
for ADDR in i2c.scan():
print(hex(ADDR), "\n")
if __name__ == '__main__':
try:
scan_I2C()
except (KeyboardInterrupt, SystemExit) as exErr:
print("\nEnding Execution")
sys.exit(0)
Here is the result with LCD, RFID and Button connected. Only the LCD and the Button are detected :
MicroPython v1.12-1556-gcc82fa9 on 2021-06-22; XBee3 DigiMesh 2.4 with EFR32MG
Type "help()" for more information.
>>>
Parsing /flash/main.py...
Compiling /flash/main.py...
Running bytecode...
+-------------------------------------+
| XBee MicroPython I2C SCAN |
+-------------------------------------+
Platform: xbee3-digimesh
Speed: 400000
0x6f
0x72
>>>
Does the Qwiic reader work with standard library/examples?
I can’t use the Spark library as it doesn’t work with Xbee micropython directly. I created a library based on Sparkfun’s one for using RFID specific functionality. But I first tried to scan the I2C devices with the Xbee I2C scan function (that uses Xbee onboard material library), and it is pretty standard.
Have you or can you try the reader with another board?
I only used Xbee module for now as I don’t have any other I2C interface module available at the moment. I guess that I should order a Sparkfun RedBoard Qwiic module ? (another 1-2 weeks wait ) The fact is that the LCD is 100% working (it is scanned and I’m able to write text on it), the button is also detected (I will try to access the functionality today) and only the RFID is not working (not scanned and can’t access the scanned data as it’s not reachable).
I was also able to make the Sparkfun I2C button work with xbee 3 module. So it’s definitely an issue with the I2C (Qwiic) RFID card (software or hardware).
I would need Sparkfun tech to help me on that. Do they frequently check this forum?
Thank you for your private email message. Unfortunately I have no experience with the Qwiic RFID Reader. I don’t have a board which I can test, and I don’t have an XBee board to test it with. Apologies!
My advice is to try to get it working using a standard Qwiic RedBoard first, and then attempt to transfer to the XBee.