This device uses a US-100 or Parallax Ping ultrasonic sensor to measure the height of a package and transmit the size to a PC. By rotating the package, all the dimensions can be determined.
It optionally supports output to a SSD1306 OLED screen and hardware buttons for zero/tare and unit switching.
Code to build a hardware middle layer between low-cost off-the-shelf barcode scanner engines (using TTL communication) and a PC, using the USB HID POS specification for barcode scanners. The HID POS barcode scanner protocol is superior to the normal keyboard emulation scanner behavior in every way, except that hardly anyone implements it.
The current code identifies the Pico as a barcode scanner to the host computer and sends a "scan" every few seconds. Getting that to work was probably the hardest part.
TODO:
- [ ] Read TTL barcode data from a scan engine
- [ ] Host-to-Pico USB communication for feedback (unusable/unrecognized barcode, etc)
- [ ] Scan beeper
- [ ] Trigger button
- [ ] OLED display for scan status, info, feedback
- [ ] Host-to-Pico list of scan "modes": enumerated strings to display on the OLED, with a hardware button to cycle through them, and the Pico sends the selected mode ID along with the barcode data. The host also sends a report to the Pico when it wants to change the current mode. This allows the scanner and the PC software to stay in sync with what the user is doing. For example, PostalPoint shipping software has several screens, and different barcodes are expected to be scanned in each screen. The user can then switch screens by switching modes on the scanner, and vice versa, allowing the scanner to navigate the program.