Использую arduino 1.8.6.
При проверки выдаёт ошибку
Сам код.
При проверки выдаёт ошибку
C++:
Gamepad_ProjectKPP:31:3: error: 'Gamepad' was not declared in this scope
exit status 1
'Gamepad' was not declared in this scope
C++:
const int pinButton2 = 2;
const int pinButton4 = 4;
void setup() {
pinMode(pinButton2, INPUT_PULLUP);
pinMode(pinButton4, INPUT_PULLUP);
Gamepad.begin();
}
void loop() {
if (!digitalRead(pinButton2))
Gamepad.press(2);
else
Gamepad.release(2);
if (!digitalRead(pinButton4))
Gamepad.press(4);
else
Gamepad.release(4);
Gamepad.write();
}