Tiny Code Reader (TCR) caught my eye when it came out in 2023. It’s a very appealing idea: a self-contained seeing module that just decodes any QR code it sees. I immediately imagined applications in desktop manufacturing, a subject very dear to my heart.
You can buy it from Adafruit, Sparkfun, and elsewhere. There’s a main page with a clear getting started guide, and a datasheet.
Because it uses the Qwiic connector standard, setting it up is a breeze . It plugs directly into I²CDriver or I²CMini - both ship with qwiic cables included. TCR has a color LED on the front side that blinks blue on power-on, and helpfully blinks green when it detects a QR code in front of it.
Within a a couple of minutes I had a Python loop that printed out the current QR code using the I²CDriver:
import sys import struct from i2cdriver import I2CDriver class TCR: pass if __name__ == '__main__': i2 = I2CDriver(sys.argv[1]) i2.setspeed(400) i2.scan() while 1: i2.start(0x0c, 1) b = i2.read(256) i2.stop() (l, ) = struct.unpack(" That’s all it took. Sure enough, it worked immediately, decoding the code in front of it: b'http://en.m.wikipedia.org' b'http://en.m.wikipedia.org' b'http://en.m.wikipedia.org' b'http://en.m.wikipedia.org' I didn’t test it with longer codes. The developer documentation hints that longer codes might be a problem. The I²C protocol itself limits the code size it can report to 254 bytes. But the biggest limitation seems to be that it needs the code to be almost dead center in front of the camera sensor. The documentation says The sensor has approximately a 110 degree field of view. ... continue reading