Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 12 of 12

Thread: Wireless USB keyboard on a Teensy?

  1. #1

    Wireless USB keyboard on a Teensy?

    Hi,

    New around here, so hi to all.

    I'd like to use a micro board of some sort (eg. Teensy), to connect up to a USB wireless keyboard (say a common cheap Logitech) and have the Teensy output a binary code (for arguments sake, you could say the ASCII code) as parallel data.

    I saw a post recently on the Teensy3 that suggested it could work with a USB keyboard, but what about a common wireless one, with just the usual little dongle plugged into the USB? I'm not sure if these still just look like a HID or if they appear as bluetooth or need some special driver that only runs under Win/Linux/etc. - anybody able to give me some info?

    Thanks in advance

  2. #2
    Member
    Join Date
    Dec 2012
    Location
    Des Moines, Iowa, USA
    Posts
    24
    Quote Originally Posted by Sleepwalker3 View Post
    Hi,
    I'd like to use a micro board of some sort (eg. Teensy), to connect up to a USB wireless keyboard (say a common cheap Logitech) and have the Teensy output a binary code (for arguments sake, you could say the ASCII code) as parallel data.
    Greetings. I am new here, as well, and have just started experimenting with a Teensy 2.0.

    I, too, am looking for a Bluetooth HID interface for something like a Teensy or Arduino. I have found a few modules which appear to support the HID (for keyboards/mise) like RN-42-HID, but nothing yet on low-cost ways to hook them up to something.

    Please post updates here if you run in to anything, and I will do the same.

  3. #3
    Hi Allen, If it's just a Bluetooth Keyboard you want, then I think that should be fairly easy (not that I've done it). Plenty of BT modules around, I saw a cheapie at Seeed the other day for $15. Sparkfun sell breakout boards with RN42 etc. on them. I would think if you just buy a normal BT keyboard (quite common these days for use with tablets, phones, etc.), then you should be able to send the data to your BT module and then via SPI, I2C or UART (just ensure the signal levels of the two are the same) to the micro you are using. I would think that wouldn't be too hard for a keyboard, though having a Bus Pirate might be handy if you are playing with that. If you want to use a mouse for something, that might be more complicated, but I haven't really looked into that (not necessary for my app).

    What I was looking at doing was a little different in that it was to be a Logitech keyboard with USB dongle designed for a PC and I don't think it's 'plain' bluetooth. I've had a quick look at the USB details reported for it, but have got to do more digging yet. Worst case I could use a RasPi, that will definitely be able to recognise they keyboard I'm using, but I'd prefer a teensy for this little application if it will do it. I'll let you know if I get anywhere with it, but it's just a side project, so progress may be slow.

  4. #4
    Member
    Join Date
    Dec 2012
    Location
    Des Moines, Iowa, USA
    Posts
    24
    Quote Originally Posted by Sleepwalker3 View Post
    Hi Allen, If it's just a Bluetooth Keyboard you want, then I think that should be fairly easy (not that I've done it). Plenty of BT modules around, I saw a cheapie at Seeed the other day for $15.
    Yes, I have been finding tons of them, but they do not support the Human Interface Device profile which is needed to act like a keyboard. The RN-42-HID does, and I see the surface mount part for around $20, but to get one on a board that is more usable was $44. So far, that's the only part I have tracked down that folks talk about for HID.

    In my case, I am wanting to take my iCade project further, and instead of only working with a USB cable plugged in to an iPad, I want to work as a Bluetooth keyboard. None of the Bluetooth Shields for Arduino I have found seem to support HID, and neither does the ArduinoBT. If the RN-42-HID was in a package that didn't expect to be surface mounted, it would be easy to wire up to the Teensy.

    It's a shame when finding a part ends up costing more than buying a whole Bluetooth keyboard :-)

  5. #5
    So you're looking for the module to act like the keyboard end of things I'm gathering? As the iPad natively takes BT, I can't see it being the other way around unless you've got something different in mind. Yes, the keyboards are very cheap these days. There is the Bluegiga modules, some of which support HID (and a pile of other profiles), but they are actually more expensive, but are more flexible than the RN-42 I believe and come with better info and better software. http://www.bluegiga.com/iWRAP_software Apparently Mouser sell them and Semiconductor store and Sparkfun also has a breakout for the WT-32, but it's not cheap. There is also the BlueSMiRF HID modules - Sparkfun also have these and a breakout, but again, not cheap (Search Sparkfun for Bluetooth HID).
    Hacking a BT keyboard would probably be cheaper, or depending on how keen you are, you could always make up a breakout board yourself and just buy the module cheap.

  6. #6
    Allen, further to the above info, I asked a Q on Sparkfun's RN-42 page about the Bluegiga WT12 and got a very quick reply from a commenter there (Jeff Rowberg), who advises he has used the WT12 (a cheaper BT module tan the WT32) in projects and gives links. Although you still have the problem of the breakout board, it does give you a few other possibilities anyway. Checkout the comments section of the RN-42 here https://www.sparkfun.com/products/10823?
    -Have just looked at his keyglove site www.keyglove.net and it turns out he's using a Teensy++2.0 for his project and has made his own WT12 breakout which he is selling on iNMOJO http://www.inmojo.com/store/jeff-row...reakout-board/ So if you wanted to go down that path you have some good resources and a good contact by the looks of it. I might even be able to get some handy tips myself

  7. #7
    Member
    Join Date
    Dec 2012
    Location
    Des Moines, Iowa, USA
    Posts
    24
    Thanks, Slepwalker3. I'd actually been to that Inmojo web page before during my research. So it seems $40+ is what it looks like it will cost -- unless we can find a non surface-mount module. I will keep looking. In the meantime, there is a $15 bluetooth keyboard on Amazon (with Prime shipping and good reviews) that I might buy and take apart. I saw someone else used one to make their own arcade controller (bluetooth wireless to an iPad).

    Also, I found a reference to using a USB Host shield on Arduino to plug up a Bluetooth USB module. I will be getting one of those soon, and see how it works. It costs about $2 to add a USB port to one of these devices that can send out (using a library) USB keyboard commands, so perhaps it's possible to go that route as well -- and interface a USB bluetooth keyboard dongle to it.

    We shall see.

  8. #8
    Thanks Allen, it will be interesting to see how you go. If I come up with anything else I'll drop a note in here.

  9. #9
    Member
    Join Date
    Dec 2012
    Location
    Des Moines, Iowa, USA
    Posts
    24
    Quote Originally Posted by Sleepwalker3 View Post
    Thanks Allen, it will be interesting to see how you go. If I come up with anything else I'll drop a note in here.
    I now have the iTead Studio USB Host shield, which didn't work with the Arduino model I wanted to use due to SPI pins being moved, and the Circuits@Home USB Host shield, which should work.

    I will be trying to hook up the cheaper iTead shield to my Teensy 2.0 soon, and document my progress.

  10. #10
    Quote Originally Posted by allenhuffman View Post
    I now have the iTead Studio USB Host shield, which didn't work with the Arduino model I wanted to use due to SPI pins being moved, and the Circuits@Home USB Host shield, which should work.

    I will be trying to hook up the cheaper iTead shield to my Teensy 2.0 soon, and document my progress.
    Sounds good, I did see that iTead shield and wondered if it would be useful for my purposes, but I think the Logitech dongle might need a specific driver, rather than just a standard HID interface. I'll likely end up with a RasPi model A (no need for all the fancy stuff) or one of the low-end Olimex Linux boards for $30 odd. I found some cheap BT modules on Deal Extreme, as well as a tiny BT USB dongle that was crazy cheap (about $1.50) and had lots of good reviews. The BT modules I think had pros and cons, but for about $8 inc. shipping, it's kind of hard to go too far wrong! Anyway, figured I'd mention it in case it's of use to you

  11. #11
    Member
    Join Date
    Dec 2012
    Location
    Des Moines, Iowa, USA
    Posts
    24
    Quote Originally Posted by Sleepwalker3 View Post
    Sounds good, I did see that iTead shield and wondered if it would be useful for my purposes, but I think the Logitech dongle might need a specific driver, rather than just a standard HID interface. I'll likely end up with a RasPi model A (no need for all the fancy stuff) or one of the low-end Olimex Linux boards for $30 odd. I found some cheap BT modules on Deal Extreme, as well as a tiny BT USB dongle that was crazy cheap (about $1.50) and had lots of good reviews. The BT modules I think had pros and cons, but for about $8 inc. shipping, it's kind of hard to go too far wrong! Anyway, figured I'd mention it in case it's of use to you
    I would be interested in what you find. There is specific support in the USB Host Library code for various Bluetooth USB dongles. Serial stuff is easy to do and cheap, but when it comes to keyboard/mouse support, it seems there are different ways they handle them.

    I need to pick up a larger breadboard to experiment with, but I am hopeful of hooking up one of these USB shields to the Teensy, and then maybe seeing what it takes to hook up the chip directly. I have a friend who is going to make me a custom board so I can plug in the Teensy, and might as well populate it with some other stuff while we are doing it.

  12. #12
    Member
    Join Date
    Dec 2012
    Location
    Des Moines, Iowa, USA
    Posts
    24
    Update: Adafruit has solved this, with a $20 part:

    http://www.adafruit.com/products/1535

    By itself, you can just wire switches to this thing and give it power and it sends key presses for the switches. What it sends can be configured/remapped. Or, you can hook this up to a microcontroller like a Teensy and send data to it via serial and it will send stuff out bluetooth (for custom things, like iCade sequences).

    There is no easy way to plug it in to an Arduino or Leonaro. I sure wish someone would make little boards with standoffs and stuff that these things could plug in to.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •