I am working on a project where I will have several Raspberry Pi 3's set up, each having two barcode scanners, two passive buzzers, and two Adafruit NeoPixel Ring lights.
Each time a barcode is scanned, an API request is sent to see if the barcode is valid or not.  If the barcode is valid, the Adafruit NeoPixel Ring will be green and a success tone is played on the buzzer, and it the barcode is invalid, the light will be blue and a failure tone is played on the buzzer.
My question is: Is there a way in Python on the Raspberry Pi to detect which barcode scanner is sending the barcode?  I realize that barcode scanners are HID devices and act like a keyboard, so I would like to know if there is a way in Python to treat the scanner different and not have an input() call to receive the scanner's input.
It is especially important to know which barcode scanner the incoming data came from so that I know which light to make green or blue and which buzzer to play the sound.  In other words, if scanner 1 had a barcode that was valid and scanner 2 had a barcode that was invalid, I want NeoPixel Ring 1 to be green and NeoPixel Ring 2 to be blue.
As it stands now, I am considering using two Arduinos and hook up each scanner, buzzer, and NeoPixel Ring to them, and then use serial communication to communicate with the Raspberry Pi from each Arduino.
What are your thoughts/suggestions?
Thank you in advance!
What I would do is set up the scanner in such a way that each one has a prefix,  so whatever code is read, it will always have a prefix i.e.   A000001, A000002, B00001, B00002,  so all you'll have to do is use a string function to know that all codes that begin with "A" come from scanner A and all that begin with "B" come from scanner B.   Regardless of what programming language you use.  this works perfect with Motorola/Zebra/Honeywell scanners..
Raspberry Pi: Detect Multiple Barcode Scanners in Python