Code to read the QR code and its contents