Principle of supermarket barcode scanner