can't compile "arduino_wifi_duck"
BUDDIKA98 opened this issue · 6 comments
`Arduino: 1.6.9 (Windows 10), Board: "Arduino/Genuino Uno"
C:\Users\Buddika\Desktop\New Folder\wifi_ducky-1.0\arduino_wifi_duck\arduino_wifi_duck.ino: In function 'void Line(String)':
arduino_wifi_duck:12: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
for(int i=firstSpace+1;i<_line.length();i++) Keyboard.write(_line[i]);
^
arduino_wifi_duck:38: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
Keyboard.releaseAll();
^
C:\Users\Pinsara udara\Desktop\New Folder\wifi_ducky-1.0\arduino_wifi_duck\arduino_wifi_duck.ino: In function 'void Press(String)':
arduino_wifi_duck:44: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
if(b.length() == 1) Keyboard.press(char(b[0]));
^
arduino_wifi_duck:45: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("ENTER")) Keyboard.press(KEY_RETURN);
^
arduino_wifi_duck:45: error: 'KEY_RETURN' was not declared in this scope
else if (b.equals("ENTER")) Keyboard.press(KEY_RETURN);
^
arduino_wifi_duck:46: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("CTRL")) Keyboard.press(KEY_LEFT_CTRL);
^
arduino_wifi_duck:46: error: 'KEY_LEFT_CTRL' was not declared in this scope
else if (b.equals("CTRL")) Keyboard.press(KEY_LEFT_CTRL);
^
arduino_wifi_duck:47: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("SHIFT")) Keyboard.press(KEY_LEFT_SHIFT);
^
arduino_wifi_duck:47: error: 'KEY_LEFT_SHIFT' was not declared in this scope
else if (b.equals("SHIFT")) Keyboard.press(KEY_LEFT_SHIFT);
^
arduino_wifi_duck:48: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("ALT")) Keyboard.press(KEY_LEFT_ALT);
^
arduino_wifi_duck:48: error: 'KEY_LEFT_ALT' was not declared in this scope
else if (b.equals("ALT")) Keyboard.press(KEY_LEFT_ALT);
^
arduino_wifi_duck:49: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("GUI")) Keyboard.press(KEY_LEFT_GUI);
^
arduino_wifi_duck:49: error: 'KEY_LEFT_GUI' was not declared in this scope
else if (b.equals("GUI")) Keyboard.press(KEY_LEFT_GUI);
^
arduino_wifi_duck:50: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("UP") || b.equals("UPARROW")) Keyboard.press(KEY_UP_ARROW);
^
arduino_wifi_duck:50: error: 'KEY_UP_ARROW' was not declared in this scope
else if (b.equals("UP") || b.equals("UPARROW")) Keyboard.press(KEY_UP_ARROW);
^
arduino_wifi_duck:51: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("DOWN") || b.equals("DOWNARROW")) Keyboard.press(KEY_DOWN_ARROW);
^
arduino_wifi_duck:51: error: 'KEY_DOWN_ARROW' was not declared in this scope
else if (b.equals("DOWN") || b.equals("DOWNARROW")) Keyboard.press(KEY_DOWN_ARROW);
^
arduino_wifi_duck:52: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("LEFT") || b.equals("LEFTARROW")) Keyboard.press(KEY_LEFT_ARROW);
^
arduino_wifi_duck:52: error: 'KEY_LEFT_ARROW' was not declared in this scope
else if (b.equals("LEFT") || b.equals("LEFTARROW")) Keyboard.press(KEY_LEFT_ARROW);
^
arduino_wifi_duck:53: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("RIGHT") || b.equals("RIGHTARROW")) Keyboard.press(KEY_RIGHT_ARROW);
^
arduino_wifi_duck:53: error: 'KEY_RIGHT_ARROW' was not declared in this scope
else if (b.equals("RIGHT") || b.equals("RIGHTARROW")) Keyboard.press(KEY_RIGHT_ARROW);
^
arduino_wifi_duck:54: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("DELETE")) Keyboard.press(KEY_DELETE);
^
arduino_wifi_duck:54: error: 'KEY_DELETE' was not declared in this scope
else if (b.equals("DELETE")) Keyboard.press(KEY_DELETE);
^
arduino_wifi_duck:55: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("PAGEUP")) Keyboard.press(KEY_PAGE_UP);
^
arduino_wifi_duck:55: error: 'KEY_PAGE_UP' was not declared in this scope
else if (b.equals("PAGEUP")) Keyboard.press(KEY_PAGE_UP);
^
arduino_wifi_duck:56: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("PAGEDOWN")) Keyboard.press(KEY_PAGE_DOWN);
^
arduino_wifi_duck:56: error: 'KEY_PAGE_DOWN' was not declared in this scope
else if (b.equals("PAGEDOWN")) Keyboard.press(KEY_PAGE_DOWN);
^
arduino_wifi_duck:57: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("HOME")) Keyboard.press(KEY_HOME);
^
arduino_wifi_duck:57: error: 'KEY_HOME' was not declared in this scope
else if (b.equals("HOME")) Keyboard.press(KEY_HOME);
^
arduino_wifi_duck:58: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("ESC")) Keyboard.press(KEY_ESC);
^
arduino_wifi_duck:58: error: 'KEY_ESC' was not declared in this scope
else if (b.equals("ESC")) Keyboard.press(KEY_ESC);
^
arduino_wifi_duck:59: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("INSERT")) Keyboard.press(KEY_INSERT);
^
arduino_wifi_duck:59: error: 'KEY_INSERT' was not declared in this scope
else if (b.equals("INSERT")) Keyboard.press(KEY_INSERT);
^
arduino_wifi_duck:60: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("TAB")) Keyboard.press(KEY_TAB);
^
arduino_wifi_duck:60: error: 'KEY_TAB' was not declared in this scope
else if (b.equals("TAB")) Keyboard.press(KEY_TAB);
^
arduino_wifi_duck:61: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("END")) Keyboard.press(KEY_END);
^
arduino_wifi_duck:61: error: 'KEY_END' was not declared in this scope
else if (b.equals("END")) Keyboard.press(KEY_END);
^
arduino_wifi_duck:62: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("CAPSLOCK")) Keyboard.press(KEY_CAPS_LOCK);
^
arduino_wifi_duck:62: error: 'KEY_CAPS_LOCK' was not declared in this scope
else if (b.equals("CAPSLOCK")) Keyboard.press(KEY_CAPS_LOCK);
^
arduino_wifi_duck:63: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("F1")) Keyboard.press(KEY_F1);
^
arduino_wifi_duck:63: error: 'KEY_F1' was not declared in this scope
else if (b.equals("F1")) Keyboard.press(KEY_F1);
^
arduino_wifi_duck:64: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("F2")) Keyboard.press(KEY_F2);
^
arduino_wifi_duck:64: error: 'KEY_F2' was not declared in this scope
else if (b.equals("F2")) Keyboard.press(KEY_F2);
^
arduino_wifi_duck:65: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("F3")) Keyboard.press(KEY_F3);
^
arduino_wifi_duck:65: error: 'KEY_F3' was not declared in this scope
else if (b.equals("F3")) Keyboard.press(KEY_F3);
^
arduino_wifi_duck:66: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("F4")) Keyboard.press(KEY_F4);
^
arduino_wifi_duck:66: error: 'KEY_F4' was not declared in this scope
else if (b.equals("F4")) Keyboard.press(KEY_F4);
^
arduino_wifi_duck:67: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("F5")) Keyboard.press(KEY_F5);
^
arduino_wifi_duck:67: error: 'KEY_F5' was not declared in this scope
else if (b.equals("F5")) Keyboard.press(KEY_F5);
^
arduino_wifi_duck:68: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("F6")) Keyboard.press(KEY_F6);
^
arduino_wifi_duck:68: error: 'KEY_F6' was not declared in this scope
else if (b.equals("F6")) Keyboard.press(KEY_F6);
^
arduino_wifi_duck:69: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("F7")) Keyboard.press(KEY_F7);
^
arduino_wifi_duck:69: error: 'KEY_F7' was not declared in this scope
else if (b.equals("F7")) Keyboard.press(KEY_F7);
^
arduino_wifi_duck:70: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("F8")) Keyboard.press(KEY_F8);
^
arduino_wifi_duck:70: error: 'KEY_F8' was not declared in this scope
else if (b.equals("F8")) Keyboard.press(KEY_F8);
^
arduino_wifi_duck:71: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("F9")) Keyboard.press(KEY_F9);
^
arduino_wifi_duck:71: error: 'KEY_F9' was not declared in this scope
else if (b.equals("F9")) Keyboard.press(KEY_F9);
^
arduino_wifi_duck:72: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("F10")) Keyboard.press(KEY_F10);
^
arduino_wifi_duck:72: error: 'KEY_F10' was not declared in this scope
else if (b.equals("F10")) Keyboard.press(KEY_F10);
^
arduino_wifi_duck:73: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("F11")) Keyboard.press(KEY_F11);
^
arduino_wifi_duck:73: error: 'KEY_F11' was not declared in this scope
else if (b.equals("F11")) Keyboard.press(KEY_F11);
^
arduino_wifi_duck:74: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("F12")) Keyboard.press(KEY_F12);
^
arduino_wifi_duck:74: error: 'KEY_F12' was not declared in this scope
else if (b.equals("F12")) Keyboard.press(KEY_F12);
^
arduino_wifi_duck:75: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
else if (b.equals("SPACE")) Keyboard.press(' ');
^
C:\Users\Pinsara udara\Desktop\New Folder\wifi_ducky-1.0\arduino_wifi_duck\arduino_wifi_duck.ino: In function 'void setup()':
arduino_wifi_duck:3: error: 'Serial1' was not declared in this scope
#define ExternSerial Serial1
^
C:\Users\Pinsara udara\Desktop\New Folder\wifi_ducky-1.0\arduino_wifi_duck\arduino_wifi_duck.ino:81:3: note: in expansion of macro 'ExternSerial'
ExternSerial.begin(BAUD_RATE);
^
arduino_wifi_duck:83: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
Keyboard.begin();
^
C:\Users\Pinsara udara\Desktop\New Folder\wifi_ducky-1.0\arduino_wifi_duck\arduino_wifi_duck.ino: In function 'void loop()':
arduino_wifi_duck:3: error: 'Serial1' was not declared in this scope
#define ExternSerial Serial1
^
C:\Users\Pinsara udara\Desktop\New Folder\wifi_ducky-1.0\arduino_wifi_duck\arduino_wifi_duck.ino:88:6: note: in expansion of macro 'ExternSerial'
if(ExternSerial.available() > 0) {
^
arduino_wifi_duck:3: error: 'Serial1' was not declared in this scope
#define ExternSerial Serial1
^
C:\Users\Pinsara udara\Desktop\New Folder\wifi_ducky-1.0\arduino_wifi_duck\arduino_wifi_duck.ino:112:5: note: in expansion of macro 'ExternSerial'
ExternSerial.write(0x99);
^
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.
`
how to fix that?
Use your Arduino Library Manager and install the library "Keyboard" as hinted in the first error message
I install the "Keyboard" library. But not fix. how to fix that?
Not working
Ok. Now it work. That's not work with Arduino uno
Maybe select a different board ? You did not specify your hardware in your problem description and it seems like you're compiling with Uno board, which has no 32u4/USB host.