From 2173a6d372600b0e85df1d0ffe01a3113a9e268e Mon Sep 17 00:00:00 2001 From: bjeanlou Date: Mon, 6 May 2019 11:03:46 +0200 Subject: [PATCH] init gestion des touches read memory et delete memory --- keygrbb.ino | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/keygrbb.ino b/keygrbb.ino index cc5644b..d8e8088 100644 --- a/keygrbb.ino +++ b/keygrbb.ino @@ -77,16 +77,31 @@ void setup() { void loop() { // Get the currently touched pads currtouched = cap.touched(); + /* + //effacement de la mémoire + if ((currtouched & _BV(/*D*/)) && !(lasttouched & _BV(/*D*/)) ) { + //effacer ce qui est présent dans la carte SD + } + //récupération des entrées + if ((currtouched & _BV(/*R*/)) && !(lasttouched & _BV(/*R*/)) ) { + //gérer la lecture du fichier contenant les entrées + //récupération des entrées + //Keyboard.write(entrée) + } + */ for (uint8_t i=0; i<12; i++) { // it if *is* touched and *wasnt* touched before, alert! if ((currtouched & _BV(i)) && !(lasttouched & _BV(i)) ) { Serial.print(tab[i]); Serial.println(" touched"); + Keyboard.press('0'+tab[i]); } // if it *was* touched and now *isnt*, alert! if (!(currtouched & _BV(i)) && (lasttouched & _BV(i)) ) { Serial.print(tab[i]); Serial.println(" released"); + Keyboard.release('0'+tab[i]); } + if(i==1 || i==5)i++; } // reset our state @@ -110,4 +125,4 @@ void loop() { // put a delay so it isn't overwhelming delay(100); -} +} \ No newline at end of file -- libgit2 0.21.2