Hi,
I have a joystick and a touch screen (2,8 inch/ILI9341) connected to the Arduino Due.
I want to control the circle with the joystick via the touch screen, but if I do nothing then the circle flickers permanently.
Can someone give me a hint - why - and if my code contains an error ?
Thanks ![]()
Grüße
Chris
#include <MCUFRIEND_kbv.h>
MCUFRIEND_kbv tft;
#define x 10
#define y 11
void setup() {
pinMode(x, INPUT);
pinMode(y,INPUT);
tft.reset();
tft.begin(0x9341);
tft.setRotation(1);
}
void loop() {
int nx,ny;
nx = analogRead(x)-600;
ny = analogRead(y)-640;
tft.drawCircle(nx,ny,25,0x001F);
tft.fillScreen(0x0000);
}