title: Raspberry Pi: Detect Multiple Barcode Scanners in Python
body: <p>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.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>What are your thoughts/suggestions?</p>
  
  <p>Thank you in advance!</p>