The first time I work with arduino.
The bottom line is that when you press a button, the text is printed
#include <Keyboard.h> #include <Mouse.h> void setup() { pinMode(1,INPUT_PULLUP); Keyboard.begin(); } void loop() { // read the pushbutton: int buttonState = digitalRead(buttonPin); // if the button state has changed, if ((buttonState != previousButtonState) // and it's currently pressed: && (buttonState == HIGH)) { // increment the button counter counter++; // type out a message Keyboard.print("You pressed the button "); } // save the current button state for comparison next time: previousButtonState = buttonState; } when compiling produces an error Клавиатура не найдена. Убедитесь входит ли скетч в код #include <Keyboard.h> Клавиатура не найдена. Убедитесь входит ли скетч в код #include <Keyboard.h>
Indicates the string Keyboard.print("You pressed the button ");