Hello, i connected ILI9341 to an arduino and ran example touch test
#include "Adafruit_ILI9341.h"
#include "URTouch.h"
#define TFT_DC 9
#define TFT_CS 10
#define TFT_RST 8
#define TFT_MISO 12
#define TFT_MOSI 11
#define TFT_SCK 13
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCK, TFT_RST, TFT_MISO);
#define t_CLK 3
#define t_CS 4
#define t_DIN 5
#define t_DO 6
#define t_IRQ 7
URTouch ts(t_CLK, t_CS, t_DIN, t_DO, t_IRQ);
void setup(){
tft.begin();
tft.setRotation(3);
ts.InitTouch();
ts.setPrecision(PREC_EXTREME);
tft.fillScreen(ILI9341_BLACK);
tft.setTextColor(ILI9341_RED);
tft.setTextSize(2);
tft.setCursor(85,5);
tft.print("Mady by alex");
tft.setTextColor(ILI9341_GREEN);
tft.setCursor(20,220);
tft.print("Are you even reading it");
}
void loop()
{
int y, x;
while(ts.dataAvailable())
{
ts.read();
x = ts.getX();
y = ts.getY();
if((x!=-1) && (y!=-1))
{
x += 0;
y += 0;
int radius = 4;
tft.fillCircle(x, y, radius, ILI9341_BLUE);
}
}
}
but there was a lot problems with calibration, it mirrored everything and when i was moving stylus up to down it was showing as right to left, then i tried to use Utouch calibration to calibrate it but it didnt worked for me, any tips to fix it?
