Table of Contents

Function Definition: codedata()

Parameters

Description

The function returns the QR Code data value detected.

Example

The example demonstrates how to make a QR Code reader in the Python Coding Environment.

Code

sprite = Sprite('Square Box')
qr = QRCodeScanner()

qr.video("on flipped", 0)
qr.disablebox()

while True:
  qr.analysecamera()
  if qr.isdetected():
    sprite.setx(qr.xpos("center"))
    sprite.sety(qr.ypos("center"))
    sprite.setdirection(qr.angle())
    sprite.say(qr.codedata())
    sprite.show()
  else:
    sprite.hide()

Output

Read More
All articles loaded
No more articles to load