

The example to control USB keyboard also find it on the USB Host Shield library 2.0 with the name “USBHIDBootKbd”. If your code reader does not match the above information after verification, is posible that you may not implement the code that we work here, so is important to check with your example of USB Host Shield 2.0 library called “USB_desc”.įor the USB_desc example appears in the example menu, you must first attach the USB Host Shield 2.0 library in the libraries folder of Arduino software.īasically what Oleghe Mazurov did in his code was to take the communication code of a USB keyboard, he make some modifications to the bar code reader and adding LCD control code. It is necessary to consider the recommendation of verifying the parameters of our device, which identify the CLASS and communication PROTOCOL as follows: Intf. I implemented the following circuit: Bar Code Scanner + Arduino Host shield code Serial.In the world industry, a lot of products are identified by bar codes, is one of the most effective methods to identify products, papers, stickers, among many other things, is for this reason that implementing a system for reading bar codes independent of a computer allows greater flexibility to these devices, is why I wanted to bring this little test that will allow many projects related to bar codes, be more flexible and portable. While (!Serial) // Wait for serial port to connect - used on Leonardo, Teensy and other boards with built-in USB CDC serial connection Void KbdRptParser::OnKeyPressed(uint8_t key)

Void KbdRptParser::OnKeyDown(uint8_t mod, uint8_t key) Void OnKeyDown (uint8_t mod, uint8_t key) Satisfy IDE, which only needs to see the include statment in the ino.Ĭlass KbdRptParser : public KeyboardReportParser The Arduino USB Host Shield is based on the MAX3421E, which is a USB peripheral/host controller containing the digital logic and analog circuitry necessary to implement a full-speed USB peripheral or a full-/low-speed host compliant to USB specification rev 2.0. My approach is store the arrives data into buffer then compare the buffer but I have failed for several trials. USB Host Shield allows you to connect a USB device to your Arduino board. I have used the library USB host shield in order to read data from barcode scanner then I would like to compare the code from barcode with an existed code which I will define in an array. It is not the sd card because the sd card works with the.

I have a project which is reading barcode scanner result then compare with an existed string. I know the usb shield host works because the LCD display works and the barcode reader works in it.
