File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed
examples/Keyboard/Setup_Keyboard Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change 2424
2525#include < SoftPathElectronics.h>
2626
27+ // Erstelle ein CustomKeyboard Objekt
2728CustomKeyboard keyboard;
2829
2930void setup () {
31+ // Starte die serielle Kommunikation
3032 Serial.begin (115200 );
3133 while (!Serial) {
32- ; // Warten auf Serial Verbindung
34+ ; // Warten auf serielle Verbindung
3335 }
34- Serial.println (" Keyboard Ready ..." );
36+ Serial.println (" Starte Tastenkalibrierung ..." );
3537
36- // Beispielschlüssel, ersetzen durch den tatsächlichen Schlüssel aus dem Setup-Script
37- // Format: "<pin> <numKeys> <tolerance> <debounceMode> <keyValue1> ... <keyValue16>"
38- String key = " 34 3 20 0 4095 1144 615 0 0 0 0 0 0 0 0 0 0 0 0 0" ;
39- keyboard.setupKey (key);
38+ // Führe die Kalibrierung durch
39+ keyboard.setupKeyboard ();
4040}
4141
4242void loop () {
43- int key = keyboard.getKeyPressed ();
44- if (key != -1 ) {
45- Serial.print (" Taste gedrückt: " );
46- Serial.println (key);
47- }
48-
49- delay (100 ); // Zum Entprellen
43+ // Während der Kalibrierung nichts tun
5044}
You can’t perform that action at this time.
0 commit comments