Le forum a migré vers l'adresse suivante:

Forum

Masquer ce message

Simple-Duino Index du Forum



Programmation pour écran tactile 3"2
Aller à la page: <  1, 2, 3  >

 
Poster un nouveau sujet   Répondre au sujet    Simple-Duino Index du Forum -> Arduino & Électronique -> Questions
Sujet précédent :: Sujet suivant  
Auteur Message
arnaud39
Débutant

Hors ligne

Inscrit le: 01 Avr 2013
Messages: 378
Masculin
Niveau d'éléctronique: Dieu vivant

MessagePosté le: Ven 12 Juil - 10:05 (2013)    Sujet du message: Programmation pour écran tactile 3"2 Répondre en citant

Il utilise cette librairie tu derais essayer  Okay
EDIT : a cette adresse une liste de tuto pour les tft mais pas ceux à ta taille : earn.adafruit.com/search?q=tft
____________________________
Ancien admin du forum, co-fondateur tutoarduino.com
Revenir en haut
arnaud39
Débutant

Hors ligne

Inscrit le: 01 Avr 2013
Messages: 378
Masculin
Niveau d'éléctronique: Dieu vivant

MessagePosté le: Ven 12 Juil - 16:26 (2013)    Sujet du message: Programmation pour écran tactile 3"2 Répondre en citant

Je te up
____________________________
Ancien admin du forum, co-fondateur tutoarduino.com
Revenir en haut
Decome37
Débutant

Hors ligne

Inscrit le: 26 Avr 2013
Messages: 48
Niveau d'éléctronique: Débutant

MessagePosté le: Sam 13 Juil - 18:18 (2013)    Sujet du message: Programmation pour écran tactile 3"2 Répondre en citant

Merciiii (mais n'étant pas chez moi pour le moment je ne peut pas essayer :/)
Merci pour tout en tout cas :)
____________________________
Revenir en haut
Visiter le site web du posteur
arnaud39
Débutant

Hors ligne

Inscrit le: 01 Avr 2013
Messages: 378
Masculin
Niveau d'éléctronique: Dieu vivant

MessagePosté le: Sam 13 Juil - 20:09 (2013)    Sujet du message: Programmation pour écran tactile 3"2 Répondre en citant

de rien on est là pour ca  Razz
____________________________
Ancien admin du forum, co-fondateur tutoarduino.com
Revenir en haut
Decome37
Débutant

Hors ligne

Inscrit le: 26 Avr 2013
Messages: 48
Niveau d'éléctronique: Débutant

MessagePosté le: Dim 11 Aoû - 16:52 (2013)    Sujet du message: Programmation pour écran tactile 3"2 Répondre en citant

bon ba sa ne marche toujours pas  Sad
je sais pas pourquoi j'me suis lancé la dedans ...
____________________________
Revenir en haut
Visiter le site web du posteur
Publicité






MessagePosté le: Dim 11 Aoû - 16:52 (2013)    Sujet du message: Publicité

Revenir en haut
Admin
Fondateur

Hors ligne

Inscrit le: 12 Avr 2012
Messages: 860
Masculin
Niveau d'éléctronique: Pro

MessagePosté le: Dim 11 Aoû - 19:43 (2013)    Sujet du message: Programmation pour écran tactile 3"2 Répondre en citant

mais nan dis pas ça on va pouvoir t'aider, c'est quoi qui marche pas ?? quelles sont les erreurs ?
____________________________
http://simple-duino.com
Revenir en haut
Decome37
Débutant

Hors ligne

Inscrit le: 26 Avr 2013
Messages: 48
Niveau d'éléctronique: Débutant

MessagePosté le: Lun 12 Aoû - 12:24 (2013)    Sujet du message: Programmation pour écran tactile 3"2 Répondre en citant

// UTFT_Demo_320x240 (C)2012 Henning Karlsen
// web: http://www.henningkarlsen.com/electronics
//
// This program is a demo of how to use most of the functions
// of the library with a supported display modules.
//
// This demo was made for modules with a screen resolution 
// of 320x240 pixels.
//
// This program requires the UTFT library.
//


#include <UTFT.h>


// Declare which fonts we will be using
extern uint8_t SmallFont[];


// Uncomment the next line for Arduino 2009/Uno
UTFT myGLCD(cte32,19,18,17,16);   // Remember to change the model parameter to suit your display module!


// Uncomment the next line for Arduino Mega
//UTFT myGLCD(ITDB32S,38,39,40,41);   // Remember to change the model parameter to suit your display module!


void setup()
{
  randomSeed(analogRead(0));
  
// Setup the LCD
  myGLCD.InitLCD();
  myGLCD.setFont(SmallFont);
}


void loop()
{
  int buf[318];
  int x, x2;
  int y, y2;
  int r;


// Clear the screen and draw the frame
  myGLCD.clrScr();


  myGLCD.setColor(255, 0, 0);
  myGLCD.fillRect(0, 0, 319, 13);
  myGLCD.setColor(64, 64, 64);
  myGLCD.fillRect(0, 226, 319, 239);
  myGLCD.setColor(255, 255, 255);
  myGLCD.setBackColor(255, 0, 0);
  myGLCD.print("* Universal Color TFT Display Library *", CENTER, 1);
  myGLCD.setBackColor(64, 64, 64);
  myGLCD.setColor(255,255,0);
  myGLCD.print("<http://electronics.henningkarlsen.com>", CENTER, 227);


  myGLCD.setColor(0, 0, 255);
  myGLCD.drawRect(0, 14, 319, 225);


// Draw crosshairs
  myGLCD.setColor(0, 0, 255);
  myGLCD.setBackColor(0, 0, 0);
  myGLCD.drawLine(159, 15, 159, 224);
  myGLCD.drawLine(1, 119, 318, 119);
  for (int i=9; i<310; i+=10)
    myGLCD.drawLine(i, 117, i, 121);
  for (int i=19; i<220; i+=10)
    myGLCD.drawLine(157, i, 161, i);


// Draw sin-, cos- and tan-lines  
  myGLCD.setColor(0,255,255);
  myGLCD.print("Sin", 5, 15);
  for (int i=1; i<318; i++)
  {
    myGLCD.drawPixel(i,119+(sin(((i*1.13)*3.14)/180)*95));
  }
  
  myGLCD.setColor(255,0,0);
  myGLCD.print("Cos", 5, 27);
  for (int i=1; i<318; i++)
  {
    myGLCD.drawPixel(i,119+(cos(((i*1.13)*3.14)/180)*95));
  }


  myGLCD.setColor(255,255,0);
  myGLCD.print("Tan", 5, 39);
  for (int i=1; i<318; i++)
  {
    myGLCD.drawPixel(i,119+(tan(((i*1.13)*3.14)/180)));
  }


  delay(2000);


  myGLCD.setColor(0,0,0);
  myGLCD.fillRect(1,15,318,224);
  myGLCD.setColor(0, 0, 255);
  myGLCD.setBackColor(0, 0, 0);
  myGLCD.drawLine(159, 15, 159, 224);
  myGLCD.drawLine(1, 119, 318, 119);


// Draw a moving sinewave
  x=1;
  for (int i=1; i<(318*20); i++) 
  {
    x++;
    if (x==319)
      x=1;
    if (i>319)
    {
      if ((x==159)||(buf[x-1]==119))
        myGLCD.setColor(0,0,255);
      else
        myGLCD.setColor(0,0,0);
      myGLCD.drawPixel(x,buf[x-1]);
    }
    myGLCD.setColor(0,255,255);
    y=119+(sin(((i*1.1)*3.14)/180)*(90-(i / 100)));
    myGLCD.drawPixel(x,y);
    buf[x-1]=y;
  }


  delay(2000);
  
  myGLCD.setColor(0,0,0);
  myGLCD.fillRect(1,15,318,224);


// Draw some filled rectangles
  for (int i=1; i<6; i++)
  {
    switch (i)
    {
      case 1:
        myGLCD.setColor(255,0,255);
        break;
      case 2:
        myGLCD.setColor(255,0,0);
        break;
      case 3:
        myGLCD.setColor(0,255,0);
        break;
      case 4:
        myGLCD.setColor(0,0,255);
        break;
      case 5:
        myGLCD.setColor(255,255,0);
        break;
    }
    myGLCD.fillRect(70+(i*20), 30+(i*20), 130+(i*20), 90+(i*20));
  }


  delay(2000);
  
  myGLCD.setColor(0,0,0);
  myGLCD.fillRect(1,15,318,224);


// Draw some filled, rounded rectangles
  for (int i=1; i<6; i++)
  {
    switch (i)
    {
      case 1:
        myGLCD.setColor(255,0,255);
        break;
      case 2:
        myGLCD.setColor(255,0,0);
        break;
      case 3:
        myGLCD.setColor(0,255,0);
        break;
      case 4:
        myGLCD.setColor(0,0,255);
        break;
      case 5:
        myGLCD.setColor(255,255,0);
        break;
    }
    myGLCD.fillRoundRect(190-(i*20), 30+(i*20), 250-(i*20), 90+(i*20));
  }
  
  delay(2000);
  
  myGLCD.setColor(0,0,0);
  myGLCD.fillRect(1,15,318,224);


// Draw some filled circles
  for (int i=1; i<6; i++)
  {
    switch (i)
    {
      case 1:
        myGLCD.setColor(255,0,255);
        break;
      case 2:
        myGLCD.setColor(255,0,0);
        break;
      case 3:
        myGLCD.setColor(0,255,0);
        break;
      case 4:
        myGLCD.setColor(0,0,255);
        break;
      case 5:
        myGLCD.setColor(255,255,0);
        break;
    }
    myGLCD.fillCircle(100+(i*20),60+(i*20), 30);
  }
  
  delay(2000);
  
  myGLCD.setColor(0,0,0);
  myGLCD.fillRect(1,15,318,224);


// Draw some lines in a pattern
  myGLCD.setColor (255,0,0);
  for (int i=15; i<224; i+=5)
  {
    myGLCD.drawLine(1, i, (i*1.44)-10, 224);
  }
  myGLCD.setColor (255,0,0);
  for (int i=224; i>15; i-=5)
  {
    myGLCD.drawLine(318, i, (i*1.44)-11, 15);
  }
  myGLCD.setColor (0,255,255);
  for (int i=224; i>15; i-=5)
  {
    myGLCD.drawLine(1, i, 331-(i*1.44), 15);
  }
  myGLCD.setColor (0,255,255);
  for (int i=15; i<224; i+=5)
  {
    myGLCD.drawLine(318, i, 330-(i*1.44), 224);
  }
  
  delay(2000);
  
  myGLCD.setColor(0,0,0);
  myGLCD.fillRect(1,15,318,224);


// Draw some random circles
  for (int i=0; i<100; i++)
  {
    myGLCD.setColor(random(255), random(255), random(255));
    x=32+random(256);
    y=45+random(146);
    r=random(30);
    myGLCD.drawCircle(x, y, r);
  }


  delay(2000);
  
  myGLCD.setColor(0,0,0);
  myGLCD.fillRect(1,15,318,224);


// Draw some random rectangles
  for (int i=0; i<100; i++)
  {
    myGLCD.setColor(random(255), random(255), random(255));
    x=2+random(316);
    y=16+random(207);
    x2=2+random(316);
    y2=16+random(207);
    myGLCD.drawRect(x, y, x2, y2);
  }


  delay(2000);
  
  myGLCD.setColor(0,0,0);
  myGLCD.fillRect(1,15,318,224);


// Draw some random rounded rectangles
  for (int i=0; i<100; i++)
  {
    myGLCD.setColor(random(255), random(255), random(255));
    x=2+random(316);
    y=16+random(207);
    x2=2+random(316);
    y2=16+random(207);
    myGLCD.drawRoundRect(x, y, x2, y2);
  }


  delay(2000);
  
  myGLCD.setColor(0,0,0);
  myGLCD.fillRect(1,15,318,224);


  for (int i=0; i<100; i++)
  {
    myGLCD.setColor(random(255), random(255), random(255));
    x=2+random(316);
    y=16+random(209);
    x2=2+random(316);
    y2=16+random(209);
    myGLCD.drawLine(x, y, x2, y2);
  }


  delay(2000);
  
  myGLCD.setColor(0,0,0);
  myGLCD.fillRect(1,15,318,224);


  for (int i=0; i<10000; i++)
  {
    myGLCD.setColor(random(255), random(255), random(255));
    myGLCD.drawPixel(2+random(316), 16+random(209));
  }


  delay(2000);


  myGLCD.fillScr(0, 0, 255);
  myGLCD.setColor(255, 0, 0);
  myGLCD.fillRoundRect(80, 70, 239, 169);
  
  myGLCD.setColor(255, 255, 255);
  myGLCD.setBackColor(255, 0, 0);
  myGLCD.print("That's it!", CENTER, 93);
  myGLCD.print("Restarting in a", CENTER, 119);
  myGLCD.print("few seconds...", CENTER, 132);
  
  myGLCD.setColor(0, 255, 0);
  myGLCD.setBackColor(0, 0, 255);
  myGLCD.print("Runtime: (msecs)", CENTER, 210);
  myGLCD.printNumI(millis(), CENTER, 225);
  
  delay (10000);
}


se qui ne va pas:



UTFT_Demo_320x240:19: error: 'UTFT' does not name a type
UTFT_Demo_320x240.pde: In function 'void setup()':
UTFT_Demo_320x240:29: error: 'myGLCD' was not declared in this scope
UTFT_Demo_320x240.pde: In function 'void loop()':
UTFT_Demo_320x240:41: error: 'myGLCD' was not declared in this scope
UTFT_Demo_320x240:49: error: 'CENTER' was not declared in this scope

et l'erreur sur cette ligne


UTFT myGLCD(cte32,19,18,17,16);   // Remember to change the model parameter to suit your display module!
____________________________
Revenir en haut
Visiter le site web du posteur
Admin
Fondateur

Hors ligne

Inscrit le: 12 Avr 2012
Messages: 860
Masculin
Niveau d'éléctronique: Pro

MessagePosté le: Lun 12 Aoû - 20:04 (2013)    Sujet du message: Programmation pour écran tactile 3"2 Répondre en citant

bizarre quand je compile la seule erreur que j'ai c'est cte32 was not declared in this scope
sinon t'es sur que t'as cette librairie ? dispo ici ?
Et t'es sur arduino UNO ou MEGA ?


EDIT :
t'es sur MEGA j'ai vus dans ton premier post donc y'a une erreur dans ton script :


// Uncomment the next line for Arduino 2009/Uno
UTFT myGLCD(cte32,19,18,17,16);   // Remember to change the model parameter to suit your display module!


// Uncomment the next line for Arduino Mega
//UTFT myGLCD(ITDB32S,38,39,40,41);   // Remember to change the model parameter to suit your display module!


devient :


// Uncomment the next line for Arduino 2009/Uno
//UTFT myGLCD(cte32,19,18,17,16);   // Remember to change the model parameter to suit your display module!


// Uncomment the next line for Arduino Mega
UTFT myGLCD(ITDB32S,38,39,40,41);   // Remember to change the model parameter to suit your display module!


Du coup de mon coté ça marche nickel avec la librairie que je te montre et le script modifié
Tiens moi au courant !!
____________________________
http://simple-duino.com
Revenir en haut
Decome37
Débutant

Hors ligne

Inscrit le: 26 Avr 2013
Messages: 48
Niveau d'éléctronique: Débutant

MessagePosté le: Mar 13 Aoû - 11:20 (2013)    Sujet du message: Programmation pour écran tactile 3"2 Répondre en citant


____________________________
Revenir en haut
Visiter le site web du posteur
Admin
Fondateur

Hors ligne

Inscrit le: 12 Avr 2012
Messages: 860
Masculin
Niveau d'éléctronique: Pro

MessagePosté le: Mar 13 Aoû - 12:36 (2013)    Sujet du message: Programmation pour écran tactile 3"2 Répondre en citant

t'as repris la librairie que je t'ai mis ?? t'as la dernière version de l'IDE arduino ??
Chez moi ça fonctionne nikel donc ça viens de chez toi
____________________________
http://simple-duino.com
Revenir en haut
Publicité






MessagePosté le: Mar 13 Aoû - 12:36 (2013)    Sujet du message: Publicité

Revenir en haut
Decome37
Débutant

Hors ligne

Inscrit le: 26 Avr 2013
Messages: 48
Niveau d'éléctronique: Débutant

MessagePosté le: Mar 13 Aoû - 20:04 (2013)    Sujet du message: Programmation pour écran tactile 3"2 Répondre en citant

je viens de tout retélécharger
toujours le même message quand je le vérifie ...  
grrr grrr grrr grrr grrr
____________________________
Revenir en haut
Visiter le site web du posteur
Admin
Fondateur

Hors ligne

Inscrit le: 12 Avr 2012
Messages: 860
Masculin
Niveau d'éléctronique: Pro

MessagePosté le: Mer 14 Aoû - 10:23 (2013)    Sujet du message: Programmation pour écran tactile 3"2 Répondre en citant

et avec un sketch d'exemple t'arrives à compiler ?
t'as bien mis tout le dossier décompréssé que t'as téléchargé dans les librairies arduino ??
je ne sais pas trop comment faire sachant que chez moi ça marche :

____________________________
http://simple-duino.com
Revenir en haut
Decome37
Débutant

Hors ligne

Inscrit le: 26 Avr 2013
Messages: 48
Niveau d'éléctronique: Débutant

MessagePosté le: Mer 14 Aoû - 21:03 (2013)    Sujet du message: Programmation pour écran tactile 3"2 Répondre en citant

j'ai réussi a faire clignoter un cub LED 3x3x3
____________________________
Revenir en haut
Visiter le site web du posteur
Admin
Fondateur

Hors ligne

Inscrit le: 12 Avr 2012
Messages: 860
Masculin
Niveau d'éléctronique: Pro

MessagePosté le: Jeu 15 Aoû - 15:05 (2013)    Sujet du message: Programmation pour écran tactile 3"2 Répondre en citant

?? et l'écran t'en es où ?? quel est le rapport avec le cube de led ?
____________________________
http://simple-duino.com
Revenir en haut
Decome37
Débutant

Hors ligne

Inscrit le: 26 Avr 2013
Messages: 48
Niveau d'éléctronique: Débutant

MessagePosté le: Jeu 15 Aoû - 19:30 (2013)    Sujet du message: Programmation pour écran tactile 3"2 Répondre en citant

pour te dire que j'arrive a communiquer avec mon arduino 
____________________________
Revenir en haut
Visiter le site web du posteur
Montrer les messages depuis:   
Poster un nouveau sujet   Répondre au sujet    Simple-Duino Index du Forum -> Arduino & Électronique -> Questions Toutes les heures sont au format GMT + 1 Heure
Aller à la page: <  1, 2, 3  >
Page 2 sur 3

 
Sauter vers:  

Index | creer un forum | Forum gratuit d’entraide | Annuaire des forums gratuits | Signaler une violation | Cookies | Charte | Conditions générales d'utilisation
Powered by phpBB
Propulsé par Simple-Duino