[vc_row][vc_column][vc_column_text]
The USB 2.0 has HOST (master device) and SLAVE(slave device). Only when a master device and a slave device are connected together, the data transmission can be achieved. With a USB host shield, you could use your Arduino to interface and control any USB slave device – mouse, keyboard, bluetooth dongles, and much more![/vc_column_text][/vc_column][/vc_row][vc_row][vc_column width=”1/1″][vc_tour][vc_tab title=”Parts List” tab_id=”1395377685-1-69″][vc_column_text]
- 1 x Arduino Uno
- 1 x USB Host Shield
- 1 x 9VDC Wall Adapter
- 1 x USB Mouse
[/vc_column_text][/vc_tab][vc_tab title=”Test” tab_id=”1395377685-2-19″][vc_column_text]1. Insert USB Host Shield onto the Arduino Uno, and apply power to the board.
2. Download test library (USB_Host_Shield), copy to directory “arduino-1.5.5/libraries”:
3. Open the sample code (click on File -> USB_Host_Shield -> HID-> USBHID_desc), and uoload the code to Arduino:
4. After loading the code, connect 9VDC power and USB mouse :
5. Open the serial port monitor (baud rate: 115200), move the mouse, you can see the serial output coordinate information and key events:
Leave a Reply
You must be logged in to post a comment.