Crates.io | barcode-scanner |
lib.rs | barcode-scanner |
version | 0.1.0 |
source | src |
created_at | 2023-02-24 10:23:19.871515 |
updated_at | 2023-02-24 10:23:19.871515 |
description | Linux interface to barcode USB hand scanners |
homepage | |
repository | https://github.com/robohouse-delft/barcode-scanner-rs |
max_upload_size | |
id | 793455 |
size | 18,466 |
Scan 1D barcodes using a hand scanner for Rust.
The barcode-scanner
crate provides a Linux interface to barcode USB hand scanners. It works with the Device
struct from the evdev
crate.
Currently supported features:
BarcodeScanner
] struct for all USB hand scanners that operate as a keyboard.This example grabs a hand scanner and prints a barcode that is read.
use barcode_scanner::BarcodeScanner;
let scanner = BarcodeScanner::new("usb-0000:00:14.0-3/input0")?;
loop {
let barcode = scanner.read()?;
println!("{}", barcode);
}
License: BSD-2-Clause OR Apache-2.0