Ciao a tutti, sono nuovo del forum e del mondo arduino...
Ho un problema di librerie con l'IDE, nello specifico con la libreria Keyboard.h; compilando mi restituisce un errore sui comandi di libreria (ad es. Keyboard.begin) e mi chiede se ho scritto la riga "#include <Keyboard.h>" (cosa che ho ovviamente fatto sia manualmente che chiamando la libreria dal pulsante sketch).
Non so veramente cosa fare!
Ringrazio in anticipo tutti coloro che volessero darmi una mano.
P.S. scusate eventuali errori ortografici e il fatto di non aver riportato precisamente l'errore, ma sto scrivendo da mobile.
Ciao,
essendo il tuo primo post, ti chiederei di presentartiQUI (spiegando bene quali conoscenze hai di elettronica e di programmazione) e di leggere con attenzione il REGOLAMENTO ... Grazie.
Guglielmo
P.S.: Ma la libreria l'hai scaricata ed installata ? Perché non è che basta mettere #include ... ci deve essere anche la libreria
Dopo essermi presentato eccomi qua. Riporto gli errori che mi dà lanciando l'esempio "KeyboardSerial":
C:\Program Files (x86)\Arduino\examples\09.USB\Keyboard\KeyboardSerial\KeyboardSerial.ino: In function 'void setup()':
KeyboardSerial:28: error: 'Keyboard' non trovata. Il tuo sketch include la riga '#include <Keyboard.h>'?
Keyboard.begin();
^
C:\Program Files (x86)\Arduino\examples\09.USB\Keyboard\KeyboardSerial\KeyboardSerial.ino: In function 'void loop()':
KeyboardSerial:37: error: 'Keyboard' non trovata. Il tuo sketch include la riga '#include <Keyboard.h>'?
Keyboard.write(inChar + 1);
^
exit status 1
'Keyboard' non trovata. Il tuo sketch include la riga '#include <Keyboard.h>'?
Ringrazio di nuovo gli intervenuti per le disponibilità.
P.S. Per quanto riguarda l'installazione della libreria, "Keyboard" è una di quelle preinstallate sull'IDE, per la comunicazione seriale con la tastiera del pc.
Potevano però includerlo anche nel README della libreria che non parla di versioni di board:
"= Keyboard Library for Arduino =
This library allows an Arduino board with USB capabilites to act as a Keyboard.
Being based on HID library you need to include "HID.h" in your sketch.
For more information about this library please visit us at
== License ==
Copyright (c) Arduino LLC. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA"
Bhe grazie a tutti per la pazienza.
Un'altra domanda: come posso allora dare un comando ad Arduino con la tastiera?