Change a Var through a QR code scan

Hey all.

Is it possible to change a variable once a qr code is scanned?

Kind of similar to how the Breakout Blockstack app allows you to us a mobile controller. And as soon as the qr is scanned, the game recognizes the action.