Всем привет. Начал осваивать Digispark, поставил библиотеку DigiKeyboard для создания HID клавиатуры, но даже библиотечный пример не работает. Вместо “Hello Digispark!” он пишет “@]ddg<a_akhYjc”
Вот код:
#include "DigiKeyboard.h"
void setup() {
// don't need to set anything up to use DigiKeyboard
DigiKeyboard.delay(2500); //wait some time before first run, to give target time to initialize
}
void loop() {
// this is generally not necessary but with some older systems it seems to
// prevent missing the first character after a delay:
DigiKeyboard.sendKeyStroke(0);
// Type out this string letter by letter on the computer (assumes US-style
// keyboard)
DigiKeyboard.println("Hello Digispark!");
// It's better to use DigiKeyboard.delay() over the regular Arduino delay()
// if doing keyboard stuff because it keeps talking to the computer to make
// sure the computer knows the keyboard is alive and connected
DigiKeyboard.delay(5000);
}
Если штатной Arduino IDE последней версии, то вынужден задать ещё один вопрос: Вы, прежде, чем использовать библиотеку, читали её документацию? Судя по всему, нет. Инструкции – они ведь для тупых, правда?
А так-то, в документации библиотеки сказано: «This driver has been developed and optimized for the GNU compiler version 3 (gcc 3). Itdoesworkwellwithgcc 4». Вы же отважно запустили её с gcc 7 в надежде, что всё заработает. Но надежда, увы, не оправдалась