Does your sketch include the line #include <<libname>>

So I just came back to Arduino and am having a problem with a library I'm trying to include.
Library is Keyboard.h
In preferences the path is set correctly,
arduino: nano
dir tree:
sketch_may26
|_ /libraries
|_ sketch_may26.ino

This is the code example (which is given within the library)

#include <Keyboard.h>

void setup() {
  Keyboard.begin();

}

void loop() {
}

Trying to compile it results in the following:

error: 'Keyboard' was not declared in this scope
Keyboard.begin();
^~~~~~~~

If verbose output is used while compiling this flag can be found

"-Ic:\\Users\\****\\Documents\\code\\arduino\\sketch_may26a\\libraries\\Keyboard\\src"

If anyone has any idea, need more info pleas.

Anyhow hava a good day :slight_smile:

The .ino file is indeed called sketch_may26 as is the sketch folder, and the arduino I am copiling for Arduino Nano.

ah thanks ... just scrolled past that in the docs

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.