Commit 2173a6d372600b0e85df1d0ffe01a3113a9e268e
1 parent
d57f2358
init gestion des touches read memory et delete memory
Showing
1 changed file
with
16 additions
and
1 deletions
Show diff stats
keygrbb.ino
... | ... | @@ -77,16 +77,31 @@ void setup() { |
77 | 77 | void loop() { |
78 | 78 | // Get the currently touched pads |
79 | 79 | currtouched = cap.touched(); |
80 | + /* | |
81 | + //effacement de la mémoire | |
82 | + if ((currtouched & _BV(/*D*/)) && !(lasttouched & _BV(/*D*/)) ) { | |
83 | + //effacer ce qui est présent dans la carte SD | |
84 | + } | |
85 | + //récupération des entrées | |
86 | + if ((currtouched & _BV(/*R*/)) && !(lasttouched & _BV(/*R*/)) ) { | |
87 | + //gérer la lecture du fichier contenant les entrées | |
88 | + //récupération des entrées | |
89 | + //Keyboard.write(entrée) | |
90 | + } | |
91 | + */ | |
80 | 92 | |
81 | 93 | for (uint8_t i=0; i<12; i++) { |
82 | 94 | // it if *is* touched and *wasnt* touched before, alert! |
83 | 95 | if ((currtouched & _BV(i)) && !(lasttouched & _BV(i)) ) { |
84 | 96 | Serial.print(tab[i]); Serial.println(" touched"); |
97 | + Keyboard.press('0'+tab[i]); | |
85 | 98 | } |
86 | 99 | // if it *was* touched and now *isnt*, alert! |
87 | 100 | if (!(currtouched & _BV(i)) && (lasttouched & _BV(i)) ) { |
88 | 101 | Serial.print(tab[i]); Serial.println(" released"); |
102 | + Keyboard.release('0'+tab[i]); | |
89 | 103 | } |
104 | + if(i==1 || i==5)i++; | |
90 | 105 | } |
91 | 106 | |
92 | 107 | // reset our state |
... | ... | @@ -110,4 +125,4 @@ void loop() { |
110 | 125 | |
111 | 126 | // put a delay so it isn't overwhelming |
112 | 127 | delay(100); |
113 | 128 | -} |
129 | +} | |
114 | 130 | \ No newline at end of file | ... | ... |