Modifications

Sauter à la navigation Sauter à la recherche
aucun résumé de modification
Ligne 17 : Ligne 17 :  
{{ADFImage|TFT-TOUCH-SHIELD-v2-01.jpg|640px}}
 
{{ADFImage|TFT-TOUCH-SHIELD-v2-01.jpg|640px}}
   −
{{ambox-stop|text=The touch screen is made of a thin glass sheet, and its very fragile - a small crack or break will make the entire touch screen unusable. Don't drop or roughly handle the TFT and be especially careful of the corners and edges. When pressing on the touchscreen, sometimes people can use the tip of their fingers, or a fingernail. If you don't find the touchscreen responds well to your fingers, you can use a rounded stylus which will certainly work. Do not press harder and harder until the screen cracks!}}
+
{{ambox-stop|text=L'écran tactile est réaliser à l'aide d'une fine feuille de verre, et est donc très fragile. Un petit éclat ou cassure rendra l'écran tactile inutilisable. Ne pas laissé tomber le TFT, ne pas le manipuler avec brutalité et être particulièrement prudent avec les coins et les bordures.<br />Certaines personnes utilisent le bout du doigt ou ongle pour presser la partie tactile. Si l'écran ne réagit pas bien avec les doigts, vous pouvez utiliser un stylet arrondis qui fonctionnera certainement très bien. Par contre ne pas presser sur l'écran de plus en plus fort... parce qu'il finira par se briser!}}
    
== Ecran Tactile - Programmation ==
 
== Ecran Tactile - Programmation ==
Getting data from the touchscreen is fairly straight forward. Start by creating the touchscreen object with
+
Obtenir les données tactiles est vraiment très simple. Il faut commencer par créer une objet écran tactile (dit ''touchscreen'' en anglais, raison pour laquelle la variable s'appelle ''ts'')
    
  Adafruit_STMPE610 ts = Adafruit_STMPE610(STMPE_CS);
 
  Adafruit_STMPE610 ts = Adafruit_STMPE610(STMPE_CS);
   −
We're using hardware SPI so the clock, mosi and miso pins are not defined here. For the shield, CS is #8 always.
+
Puisque nous utilisons le bus SPI matériel, la seule proche à préciser est ''Chip Select'' qui active la contrôleur tactile. La définition des autres broches SPI (clock, mosi et miso) ne sont pas définie ici. Pour le shield TFT, le ''Chip Select'' (CS) est toujours sur la broche #8.
Then you can start the touchscreen with
+
 
 +
Ensuite, vous pouvez démarrer la partie tactile avec
    
  ts.begin()
 
  ts.begin()
29 918

modifications

Menu de navigation