Go Down

Topic: Keyboard Library (Read 2305 times) previous topic - next topic

skullboneslayer

Hey everyone, I was looking into becoming even more lazy then I already am, and that's when I relised I can control my computer simply by plugging in my Arduino using the "Keyboard.h" library and the "mouse.h" library however, after opening and verifying the keyboard ones, it appears there is a glitch in the Library's, it doesn't seem to recognise any of the code that the library should support? is anyone else having this issue? please let me know how to fix it, Thanks!

pert

#1
Dec 18, 2016, 09:41 am Last Edit: Dec 18, 2016, 09:41 am by pert
Which Arduino are you using? The Keyboard and Mouse libraries are only supported by the ATmega32U4 based boards such as Leonardo, Pro Micro, Yun, etc. and the Due, Zero, etc.

skullboneslayer

Currently I own an Arduino Uno and Arduino Nano however, it is in the actual code I am having the problem it won't even varify my code because it says I don't have #include <Keyboard.h> even tho I do..?

pert

Those boards aren't compatible with the Keyboard library. I recommend getting a Pro Micro or Leonardo.

skullboneslayer

Oh OK that's kinda cheeky lol I figured it would have said something like board not compatible not does your code have blah OK thanks for your help and do you have a link to where I can get a Pro Micro Leonardo's are pretty expensive lol

pert

This one is $3.78USD w/ free shipping right now:
http://www.ebay.com/itm/162238883428
If the price is different you might want to search around a bit because these sellers like to change their prices around frequently. If you buy from a different listing make sure the one you get has the ATmega32U4, not ATmega328P. The sneaky sellers like to put "Pro Micro replacement" or something like that in the title so the cheaper Pro Mini clones will show up in the search for the Pro Micro. The headers are not soldered so if you need them you will need to solder them yourself.

They have reasonably cheap Leonardo clones on eBay also but I prefer the Pro Micro for most things because it plugs right into the breadboard and is so compact.

In general I prefer the ATmega328P based boards such as Nano, Pro Mini, Uno, etc to the ATmega32U4 boards. I only use the ATmega32U4 boards when I need the Keyboard/Mouse library functionality.

skullboneslayer

Awesome thanks! I do know how to solder and I do it well however for my project I'm just using the Pro Mini for the keyboard library so I won't need pins lol thanks for your help

Go Up