Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (34 sloc) 1.34 KB

QR Code on the sensors

Every sensor has a QR Code printed on it, or in the box (for the small window sensors), it looks like this one:

QR Code

The encoding is different from the above example (which I quickly generated):

  • ECC Level L (Low Error Correction)
  • Mask Pattern 3
  • Encoding Format: 8-bit Byte (Because of the CR character)
  • Version 3: 29x29 Pixel

This allows 53 characters to be stored in the QR code, which works for the sensors.

The text contains three lines of ASCII text, with the lines separated by CR (ASCII 13):

  1. serial number of the sensor
  2. production date (day.month.year)
  3. product name or version number.

Here is a small sample code that generates the QR Code:


    import qrcode

    qr = qrcode.QRCode(

    sensorID = '091234567890'           # [0-9A-F]{12}
    productionDate = '01.02.2015'       # "dd.MM.yyyy"
    productCode = 'MA10320/103300'


    img = qr.make_image()"qrcode.png","PNG")