Hello. I'm new to programming, and had been successful to use the #include <Keyboard.h> library with an Arduino Leonard. I bought an Arduino Giga R1 Wifi to try to do the same, but am getting an error. Can someone help me understand why this will not work? I looked under the Arduino website and it says that the Keyboard HID is available on the Giga R1. Does it mean that it will only work with a USB keyboard?
Code:
#include <Keyboard.h>
void setup() {
Keyboard.begin();
}
void loop() {
Keyboard.press('a');
}
Error:
WARNING: library Keyboard claims to run on avr, samd, sam architecture(s) and may be incompatible with your current board which runs on mbed_giga architecture(s).
C:\Users\RAZER\AppData\Local\Temp\.arduinoIDE-unsaved2024214-19588-17x8g0y.fozvh\sketch_mar14a\sketch_mar14a.ino: In function 'void setup()':
C:\Users\RAZER\AppData\Local\Temp\.arduinoIDE-unsaved2024214-19588-17x8g0y.fozvh\sketch_mar14a\sketch_mar14a.ino:4:1: error: 'Keyboard' was not declared in this scope
Keyboard.begin();
^~~~~~~~
Multiple libraries were found for "Keyboard.h"
Used: C:\Users\RAZER\Documents\Arduino\libraries\Keyboard
Not used: C:\Users\RAZER\AppData\Local\Arduino15\libraries\Keyboard
exit status 1
Compilation error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?