Home > Arduino, Bluetooth, TKJ Electronics, USB > USB Host Shield is now available in the webshop

USB Host Shield is now available in the webshop

This is a short announcement regarding the USB Host Shield from Circuits@Home, which we are now carrying in in our store.
By buying the official shield you will support the continous development of the library and get support from us!
The shield can be found and bought here: USB Host Shield 2.0 for Arduino.

The shield can be used with almost any kind of Arduino including the most popular Arduino Uno, Arduino Mega, Arduino Leonardo etc. If you are in doubt if your Arduino is supported please don’t hesitate to write a comment below.

The USB Host Shield will allow you to use any of the Bluetooth and USB libraries I wrote.

In case you missed it I have written several libraries for the shield including:

The Serial Port Protocol (SPP)
Emulate a serial port via Bluetooth, which allows you to send data back and fourth wirelessly.

PS3 controllers
All the official controllers are supported both via USB and Bluetooth.

PS4 controllers
The PS4 controller is supported via both USB and Bluetooth as well.

Xbox controllers
Both the wireless and wired controllers are supported. You will need a special wireless receiver to use the wireless controller.

The Wiimote is supported including the build IR camera. The Motion Plus and Nunchuck extensions are also supported. The Wii U Pro Controller is supported as well.

Bluetooth HID devices
Standard Bluetooth HID devices, like mice and keyboards are also supported by the library.

The USB Host Shield support several other devices including:

The source code can be found at Github:

More information can be found at Circuits@Home.

USB Host Shield

Categories: Arduino, Bluetooth, TKJ Electronics, USB Tags:
  1. Kareem
    February 10th, 2013 at 21:52 | #1

    Dear Lauszus,

    I’ve sent you an email regarding interfacing USB Modem with Arduino through USB Host Shield.

    Kindly see it and let me know, hope you help me in this case :(

    Best Regards,


  2. February 10th, 2013 at 22:53 | #2

    I just replied to your email.

  3. Kareem
    February 12th, 2013 at 11:25 | #3

    Thanks for your cooperation.

  4. February 13th, 2013 at 02:16 | #4

    You’re welcome :)

  5. nero
    July 1st, 2013 at 13:53 | #5

    Hello , I would like to thank you for the library .
    I’m using it to control a motor of a rc Car using the ps3 controller by Bluetooth and arduino .
    Im now in the programming process and I want to use switches or else the programe will be too long
    so what should I edit to me code so that the the switch happens when I press a button

    switch (when button pressed) {
    case ‘PS3.getButtonPress(CROSS)’:
    digitalWrite(BLP, HIGH);
    case ‘PS3.getButtonPress(SQUARE)’:
    digitalWrite(BLP, LOW);


  6. July 1st, 2013 at 14:05 | #6

    I’m glad that you like my library. Have you got a video of it? I would love to see it :)

    You could simply do it like so:

    if (PS3.getButtonClick(CROSS))
        digitalWrite(BLP, HIGH);
    else if (PS3.getButtonClick(SQUARE))
        digitalWrite(BLP, LOW);

    You can find more information about the library and all it functions etc. here: http://felis.github.io/USB_Host_Shield_2.0/class_p_s3_b_t.html.

  7. nero
    July 1st, 2013 at 16:22 | #7

    thanks for the quick response : ) I really appreciate it :) and sorry for posting on more than one page :(

    I already wrote it this way , but I have many controls so I’ll be using around 10 buttons :) thats why I’m thinking about the switch method
    so is there an alternative way of saying “switch when a button is pressed and based on which button is pressed the motors will move ?

  8. July 1st, 2013 at 16:36 | #8

    No problem :)

    You can’t do it that way, as you have to read the individual bits in the incoming data. That’s why I have made those functions. Take a look at the source code on how they work: https://github.com/felis/USB_Host_Shield_2.0/blob/master/PS3BT.cpp#L52-L61.

    This means that you can’t use a switch method. Simply just use a bunch of if and else if as it is shown in the example.

    If you just want to switch a light, when any button has been pressed, then simply make this public: https://github.com/felis/USB_Host_Shield_2.0/blob/master/PS3BT.h#L236 and then use it like so:

    if (ButtonState)
    // Any button has been pressed
  9. nero
    July 2nd, 2013 at 15:40 | #9

    Ok got the point :) . once I finish Ill post a video of what I did . Im currently having a problem with the outputs from arduino uno so Im trying to use the ps3bt with the arduino adk but its not working
    the serial port gives me the following

    OSC did not start

  10. July 2nd, 2013 at 15:59 | #10

    You need to uncomment the following line: https://github.com/felis/USB_Host_Shield_2.0/blob/master/avrpins.h#L25 for it to work.

  11. Hong
    November 12th, 2013 at 09:48 | #11

    Now I’m trying to connect Arduino board to a sensor board that was already made using USB Host Shield and libraries.
    But unfortunately, you’re library doesn’t support CP210x usb to serial converters.

    Do you have any plan to support CP201x? or Is there any solution to connect CP210x by modifing existing source code?

  12. November 13th, 2013 at 17:19 | #12

    Yes we are planning on that. Hopefully it will be ready before new year :)

  13. ali
    November 28th, 2013 at 10:20 | #13

    i am doing my final year project on robotic arm interfacing with the mouse on the platform of ardiuno,i have usbhost shield even from sparkfun,but how to connect ardiuno with the usb host shield i am not getting.

  14. Chris
    December 30th, 2013 at 04:13 | #15

    I just have an inquiry. Right now I have the Arduino UNO, and the USB Host shield from Circuits@Home. When I run and compile the code I get the message on my Serial Monitor saying that “OSC did not start”. I’m not sure if my BT dongles should have a light, but if it should Its not coming on.

  15. December 30th, 2013 at 16:32 | #16

    Hmm strange. Is it an official Arduino Uno? Also have you soldered the ICSP properly? You can find instructions here: http://www.circuitsathome.com/mcu/usb-host-shield-illustrated-assembly-guide.

    Btw that error means that there is no communication with the MAX3421E chip on the shield.

  16. Juergen
    February 10th, 2014 at 00:20 | #17

    Hello, have you any clue when the library for the CP210x is ready? In a power supply, part of my present project, a CP2102 is installed. If the library takes even longer, I must attempt to disassemble the power supply and replace the chip by another.

  17. February 18th, 2014 at 00:00 | #18

    This is unfortunately not something that is planned at the moment.

  18. Chris
    March 11th, 2014 at 02:02 | #19

    everything is soldered on correctly as far as I know, I bought new dongles and I’m still getting the same message. I’m about to send an e-mail with pictures of the set up if thats ok.

  19. March 11th, 2014 at 17:20 | #20

    You need to solder the ICSP header as well! The SPI pins are located on that header!

  20. April 13th, 2014 at 16:46 | #21

    Hello Lauszus,
    For an arduino project I would like to connect a wireless ps3 controller to an arduino and so I am thinking to buy your usb-host shield. But I have one question: Why do I actually need the intermediate step of a usb-host shield? Is it not possible to directly connect a bluetooth receiver HC05 to the arduino like: http://www.instructables.com/id/Arduino-AND-Bluetooth-HC-05-Connecting-easily/ ?

    Although I think it should be possible to connect a ps3 controller to the HC05 I cannot find any documentation on it (especially pairing the two together). In this way I wouldn’t need the intermediate step of transferring bluetooth data to USB data and the size of my project could be a bit smaller.

    Already thanks, kind regards!

  21. April 13th, 2014 at 16:51 | #22

    No unfortunately that is not possible as the HC05 module doesn’t support Bluetooth HID. Furthermore paring with the PS3 controller is done via USB, so there is no way to pair with it using the HC05 module.

  22. dk6
    June 19th, 2014 at 18:26 | #23


    I am using your library with success with wii mote!! Is there anay library for the wii balance board? I am trying to pair with it and read the sensors, like weight!

    thank you!!!

  23. June 20th, 2014 at 16:38 | #24

    No I have not written a library for the Wii balance board, as I don’t own one.

  24. dk6
    June 20th, 2014 at 18:17 | #25

    First of all thank you for your quick reply. I must say that you done great job with the code!
    Here there is some usefull info about the wii balance board:


    What steps should i follow such as to make modifications to your library, to be connected to the wii balance board. They say that wiimote functions are the same as wii balance board.

    any ideas to start with??

    thank you again!

  25. dk6
    June 20th, 2014 at 18:18 | #26


    June 20th, 2014 at 18:17 | #25 Reply | Quote
    First of all thank you for your quick reply. I must say that you done great job with the code!
    Here there is some usefull info about the wii balance board:
    What steps should i follow such as to make modifications to your library, to be connected to the wii balance board. They say that wiimote functions are the same as wii balance board.
    any ideas to start with??
    thank you again!

  26. dk6
    June 20th, 2014 at 18:34 | #27

    Moreover i have noticed something:

    With wii-mote when i make the pairing method button 1+2 i have connection. When i try with the red button pairing method (behind the battery pack of the wii mote) i have NO connection.

    In the wii balance board there is only the red button for the pairing.

    They say ( http://wiibrew.org/wiki/Wiimote#Bluetooth_Pairing ) the pairing pin is different depends the pairing method!

  27. June 21st, 2014 at 00:34 | #28

    Take a look how the Motion plus and Nunchuck are initialized. You need to do the same thing for the Wii Balance board and then you should be able to parse the incoming data -- see: http://wiibrew.org/wiki/Wii_Balance_Board#Data_Format.

    The Pro U Controller does this as well. Take a look at the following function: https://github.com/felis/USB_Host_Shield_2.0/blob/b3b476af331e17f94ba6203eefd00869720a7478/BTD.cpp#L1068-L1102.
    You should especially take a close look at these lines: https://github.com/felis/USB_Host_Shield_2.0/blob/b3b476af331e17f94ba6203eefd00869720a7478/BTD.cpp#L1080-L1089.

  28. NicoHood
    June 21st, 2014 at 00:49 | #29

    dk6: i had problems with the wiiu pro controller and the cheap 1€ doogles. they only worked with the wiimote for me. (on pc they work with the pro controller, no idea why the host shield doesnt work with them für wiiupro)

    I recommend this doogle. Its cheap, looking okay and working for the pro controller:

  29. dk6
    June 22nd, 2014 at 17:54 | #30


    Thank you NicoHood for the usefull info! Just in case i have already order the dongle you told me. But until it comes to me i have to do the test with the current one i have. Wii balance board is an old controller although. I have to figure out how to pair with it with the red button method. I am still reading Lauszus libraries and try to find a solution. Every help is welcomed of course and thank you very much for your infos.

  30. dk6
    June 22nd, 2014 at 20:37 | #31

    Also when i make this #define ENABLE_UHS_DEBUGGING 1
    i am getting a lot of errors in Arduino IDE compiler…

    \libraries\USB_Host_Shield_20/settings.h:107:53: error: operator ‘&&’ has no right operand

  31. dk6
    June 23rd, 2014 at 22:27 | #32


    So can i use directly the

    WII Wii(&Btd, PAIR); ??

    which libraries i need for my arduino uno sketch to include? what libraries i have to modify?

    Please a little help :-(

  32. June 27th, 2014 at 15:13 | #33

    Yes. By using this initializer method for the Wii part of the USB Host library you enable the pairing functionality that means it will look for Wii devices to pair with.
    This is only needed once. Afterwards the initializer method can be changed to just: WII Wii(&Btd);

    Regarding your issue with the ENABLE_UHS_DEBUGGING can you please confirm which version of the Arduino IDE you are using? Also which version of the USB Host library are you using? The latest from Github?
    There shouldn’t appear any errors when enabling the debugging as long as you haven’t modified the library.

  33. dk6
    June 27th, 2014 at 19:29 | #34

    Well i have installed all over arduino IDE and the latest library from Github.
    I just open settings.h and make the change ” #define ENABLE_UHS_DEBUGGING 0 ” 0->1
    I open the wii example to compile it…. and i have these errors… please check image link
    when i open settings.h again and change 1->0 everything is ok!!!
    ARDUINO 1.0.5-r2 and Github from https://github.com/felis/USB_Host_Shield_2.0

  34. June 28th, 2014 at 11:55 | #35

    As the error indicated the program is too large to fit on the Uno with debugging enabled. You might want to get a Arduino Mega instead.

  35. dk6
    July 10th, 2014 at 13:52 | #36

    Hello again! Now i have both dongles NicoHood suggested me. But still i can not connect with Wii balance board. I would like to ask you something. Why i can only pair with wii-mote (Wii.sch example) when i push button 1+2? and not with the red-sync button (battery case) ??? The library is only for the 1+2 method? I am telling you this because wii-balance board has only the red-sync button. Thank you for your support all of you!

  36. dk6
    July 16th, 2014 at 21:49 | #38

    i know the mac addresses (bluetooth dongle and wii balance board) . The pin when i press the red sync button is the mac address of the bluetooth dongle but reverse. Is there any command which i can give directly with the pin already included? I don’t want automate discover and pairing.

    like…WII Wii(&Btd, “PIN”); ???

    thank you :-)

  37. July 19th, 2014 at 05:25 | #39

    No you will have to modify the library.
    Please see my earlier reply: http://blog.tkjelectronics.dk/2013/01/usb-host-shield-is-now-available-in-the-webshop/#comment-505352.

  38. Luca
    August 12th, 2014 at 01:01 | #40

    I am getting “OSC did not start.” error…
    Is it linked to the power supply?
    I am using an Arduino Pro (http://arduino.cc/en/Main/ArduinoBoardPro) powered&programmed via FTDI board.

    My USB Host board is the “Sainsmart USB Host” board (http://www.sainsmart.com/sainsmart-usb-host-android-adk-shield-2-0-for-arduino-uno-mega-r3-mega2560-duemilanove-nano-robot.html)

  39. August 12th, 2014 at 17:40 | #41

    Have you remembered to solder the ICSP header as well?

    Also please note that you have bought a clone! Please consider buying the official shield either from me: http://shop.tkjelectronics.dk/ or https://www.circuitsathome.com/products-page/arduino-shields in order to support the actual developers of the library and hardware!

  40. John Goodman
    September 5th, 2014 at 20:45 | #42


    Will your library work with a BLE device? I would like to send serial data to the USB Host Shield from iOS using BLE. I don’t expect to use your BTHID.cpp methods but I’d like to be able to reuse some of the BTD.cpp code.

    Thanks for your guidance.

  41. September 9th, 2014 at 00:03 | #43

    @John Goodman
    Yes it will work. You simply need a dongle that support Bluetooth 4.0, but you might need to modify the library as well.

  1. February 20th, 2013 at 15:21 | #1