Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is exactly how it typically works. There's a time that needs to pass before the scanner accepts the same barcode again, and any other barcode scanned resets the lock for the previous barcode (so you could scan two different items over and over in very quick succession, but this doesn't work with just one item). The time is configurable on the scanner and typically in the 1-2 second range.

As I work in cash register software development and sometimes wanted to perform performance tests on real hardware and without mocking the scanner away I have developed a few tricks around this rescan prevention delay. One involves a wheel with different barcodes printed on the side that is attached to a battery-powered screwdriver machine. The more sophisticated one is a belt made of paper with different barcodes on it that is always being rotated around using wheels in a little machine built using LEGO Technic parts. It is pretty awesome how mind-boggingly fast those bigger laser barcode scanners can scan barcodes when they are presented to them by the LEGO scan robot :D



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: