Skip to content

I've loaded the library file for Ridkey.h, but it still gets an error. #802

Closed
@1399568389

Description

@1399568389

I've loaded the library file for Ridkey.h, but it still gets an error.

The error message:
exit status 1
No 'keyboard' found.Does the project include '#include <Keyboard.h>'?

Short code:

#include <Keyboard.h>

void setup() {
// make pin 2 an input and turn on the
// pullup resistor so it goes high unless
// connected to ground:
pinMode(2, INPUT_PULLUP);
Keyboard.begin();
}

void loop() {
//if the button is pressed
if (digitalRead(2) == LOW) {
//Send the message
keyboard.press("Hello!");
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions