How QR codes work

What the squares mean, where QR codes came from and how they differ from barcodes.