/*
Fingerprint - generating a complex graphics pattern with little code.
Try changing line 27 and experimenting with the patterns, e.g.:
tft.drawPixel(x, y, (x + y) * sin(x * y));
https://wokwi.com/arduino/projects/307567963154678338
*/
#include <Adafruit_ILI9341.h>
#define TFT_CS 9
#define TFT_DC 10
#define WIDTH 320
#define HEIGHT 240
int LOOP_PERIOD = 1000; // Display updates every 35 ms
unsigned long time_now = 0;
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
void setup(void) {
tft.begin();
tft.fillScreen(ILI9341_BLACK);
tft.setTextColor(ILI9341_RED);
tft.println("cock");
tft.setRotation(1);
pinMode(A3, INPUT);
}
void loop() {
time_now = millis();
int value = analogRead(A3);
tft.setCursor(50,50);
tft.setTextColor(ILI9341_GREEN);
tft.println(value);
//Serial.println(value);
while(millis() < time_now + LOOP_PERIOD){
//waits?
}
tft.setCursor(50,50);
tft.setTextColor(ILI9341_BLACK);
tft.println(value);
}