Hi,
I'm using the ILI9341 display with Arduino Nano 33 BLE. After playing with a couple of libraries Adafruit_ILI9341 and UTouch libraries seems to compile. However, the display is really really slow. The nano BLE board uses nRF52840, which has SPI speed up to 32MHz. How can I improve the refresh rate of the display? Here's the code I'm currently using.
//Adafruit and SPI libraries
#include "SPI.h"
#include "UTouch.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
//Pins
#define TFT_DC 10
#define TFT_CS 12
#define TFT_MOSI 9
#define TFT_CLK 8
#define TFT_RST 11
#define TFT_MISO 7
//Create ILI9341 instance
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);
#define ts_sck 4
#define ts_cs 3
#define ts_mosi 2
#define ts_miso A6
#define ts_irq A7
UTouch ts(ts_sck, ts_cs, ts_mosi, ts_miso, ts_irq);
void setup(){
tft.begin();
tft.setRotation(-1);
tft.fillScreen(ILI9341_YELLOW);
ts.InitTouch();
ts.setPrecision(PREC_HI);
tft.setTextColor(ILI9341_BLACK);
tft.setTextSize(3);
tft.setCursor(80,15);
tft.print("Test Touch ");
tft.setTextColor(ILI9341_RED);
tft.setTextSize(2);
tft.setCursor(20,220);
tft.print("test");
}
void loop()
{
long x, y;
while(ts.dataAvailable())
{
ts.read();
x = ts.getX();//+15
y = ts.getY();//+5
if((x!=-1) && (y!=-1))
{
int radius = 3;
tft.fillCircle(x, y, radius, ILI9341_BLACK);
}
}
}