Sample code for barcode reading