include keyboard.h file

Arduino/Teensy software/code questions and discussion
Post Reply
Tok_Tok
Posts: 12
Joined: Mon Sep 05, 2016 7:01 am
Has thanked: 2 times
Been thanked: 10 times

include keyboard.h file

Post by Tok_Tok » Thu Sep 22, 2016 1:32 pm

Hello,

I'm trying to upload the controller file for the teensy to an Arduino Pro mini because I had one laying around. But I can't seem to get past this error:

Code: Select all

Game_Boy_Zero:38: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
   Keyboard.begin();
How can I solve this? I already tried to include the suggested code in the sketch: #include <Keyboard.h> but that didn't work.

myPiZero
Posts: 30
Joined: Mon Aug 15, 2016 11:34 pm
Been thanked: 5 times

Re: include keyboard.h file

Post by myPiZero » Thu Sep 22, 2016 2:37 pm

You can't use an Arduino pro mini. The pro mini has a Atmega328 micro-controller, and the pro micro and teensy have Atmega32u4, which can be used as a USB HID (i.e. keyboard).

Tok_Tok
Posts: 12
Joined: Mon Sep 05, 2016 7:01 am
Has thanked: 2 times
Been thanked: 10 times

Re: include keyboard.h file

Post by Tok_Tok » Fri Sep 23, 2016 12:32 am

Ah oke thank you! I was breaking my head over this..

I will get a teensy then :)

myPiZero
Posts: 30
Joined: Mon Aug 15, 2016 11:34 pm
Been thanked: 5 times

Re: include keyboard.h file

Post by myPiZero » Fri Sep 23, 2016 12:49 am

You can buy an Arduino pro micro, it is cheaper.
I made a sketch for it, here.

Tok_Tok
Posts: 12
Joined: Mon Sep 05, 2016 7:01 am
Has thanked: 2 times
Been thanked: 10 times

Re: include keyboard.h file

Post by Tok_Tok » Fri Sep 23, 2016 1:02 am

Thanks that saves some money. I think the arduino hardware is pretty expensive.. Looking at the Raspberry Pi Zero only costing 4 dollars which can run an entire OS.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest