Go Down

Topic: File -> examples -> usb -> keyboard -> KeyboardMessage [not work this example] (Read 39 times) previous topic - next topic

makerbrasil

Hi, my name is Alex from Brazil.

I have a dificult with for use anyone example usb -> keyboard -> KeyboardMessage

When loaded the example KeyboardMessage and do it a code test from IDE of the Arduino there is a error.


pert

When you encounter an error you will see a button on the right side of the orange bar "Copy error messages". Click that button and then paste it in a message here USING CODE TAGS(</> button on the toolbar).

FYI, you can only use that example with the ATmega32U4 based boards such as Leonardo and Micro.

makerbrasil

Arduino: 1.6.13 (Linux), Board: "Arduino/Genuino Uno"

In file included from /tmp/arduino_modified_sketch_998993/sketch_dec01a.ino:1:0:
/home/alex/Arduino/libraries/Keyboard/src/Keyboard.h:29:2: warning: #warning "Using legacy HID core (non pluggable)" [-Wcpp]
 #warning "Using legacy HID core (non pluggable)"
  ^
/tmp/arduino_modified_sketch_998993/sketch_dec01a.ino: In function 'void hitEnter()':
sketch_dec01a:39: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
   Keyboard.releaseAll();
   ^
/tmp/arduino_modified_sketch_998993/sketch_dec01a.ino: In function 'void sendCommand(String)':
sketch_dec01a:46: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
   Keyboard.releaseAll();
   ^
/tmp/arduino_modified_sketch_998993/sketch_dec01a.ino: In function 'void openAdminCMD()':
sketch_dec01a:66: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
   Keyboard.releaseAll();
   ^
sketch_dec01a:67: error: 'KEY_LEFT_GUI' was not declared in this scope
   Keyboard.press(KEY_LEFT_GUI);     //
                  ^
sketch_dec01a:80: error: 'KEY_LEFT_ARROW' was not declared in this scope
Multiple libraries were found for "Keyboard.h"
 Used: /home/alex/Arduino/libraries/Keyboard
 Not used: /home/alex/livre/arduino-1.6.13/libraries/Keyboard
   Keyboard.press(KEY_LEFT_ARROW);   //
                  ^
/tmp/arduino_modified_sketch_998993/sketch_dec01a.ino: In function 'void setup()':
sketch_dec01a:113: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
   Keyboard.begin();
   ^
exit status 1
'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

pert

You can't use the Keyboard or Mouse functions with the Uno board. They are only supported by the ATmega32U4 based boards.

pert


makerbrasil


Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy