first commit

This commit is contained in:
Jérôme Delacotte
2025-03-06 11:15:32 +01:00
commit 7b30d6e298
5276 changed files with 2108927 additions and 0 deletions

88
UTFT/UTFT.ino Executable file
View File

@@ -0,0 +1,88 @@
//******************************************************
// Ecran graphique 320x240 pixels couleur
// affichages géométriques
// (fonds, points, lignes, cercles, rectangles)
// modifié tiptopboards.com 03 11 2014
// demo_utft_2
// selon http ://tronixstuff.com/
//
//******************************************************
#include <memorysaver.h> //Ajouté pour optimiser la mémoire Uno
#include "UTFT.h"
UTFT myGLCD(ILI9325C,19,18,17,16); //uno
void setup()
{
myGLCD.InitLCD(LANDSCAPE);
myGLCD.clrScr();
randomSeed(analogRead(0));
}
void loop()
{
// demonstrate myGLCD.fillScr() rouge, puis vert, puisbleu
myGLCD.fillScr(255,0,0);
myGLCD.fillScr(0,255,0);
myGLCD.fillScr(0,255,255);
// demonstrate myGLCD.drawPixel() damier de points
myGLCD.clrScr();
myGLCD.setColor(0, 0, 255);
for (int x=0; x<320; x+=10)
{
for (int y=0; y<240; y+=10)
{
myGLCD.drawPixel(x,y);
delay(10);
}
}
// demonstrates myGLCD.drawLine() triangles rouges
myGLCD.clrScr();
myGLCD.setColor(255, 0, 0); rouge
for (int x1=0; x1<320; x1+=40)
{
for (int x2=319; x2>=0; x2-=40)
{
myGLCD.drawLine(x1,0,x2,239);
}
}
// demonstrates myGLCD.drawRect() grillage
myGLCD.clrScr();
myGLCD.setColor(255, 255, 0);
for (int x1=0; x1<320; x1+=10)
{
for (int y2=0; y2<240; y2+=20)
{
myGLCD.drawRect(x1,0,0,y2);
delay(20);
}
}
// demonstrates myGLCD.fillRect() remplissage
myGLCD.clrScr();
myGLCD.setColor(255, 255, 255);
for (int x1=0; x1<320; x1+=10)
{
for (int y2=0; y2<240; y2+=20)
{
myGLCD.fillRect(x1,0,0,y2);
}
}
// demonstrates myGLCD.drawCircle() and .fillCircle
myGLCD.clrScr();
for (int r=5; r<100; r+=5)
{
myGLCD.setColor(255, 0, 0); //cercles bleus et rouges
myGLCD.drawCircle(160,120,r);
delay(100);
myGLCD.setColor(0, 0, 255);
myGLCD.fillCircle(160,120,r);
delay(50);
}
}