// Test project.
//
// See also: https://wokwi.com/projects/453913815073382401
/*
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
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
#define WIDTH 320
#define HEIGHT 240
void setup(void) {
Serial.begin(115200);
Serial.print("SCK is pin ");
Serial.println(SCK);
Serial.print("MISO is pin ");
Serial.println(MISO);
Serial.print("MOSI is pin ");
Serial.println(MOSI);
Serial.print("SS is default pin ");
Serial.println(SS);
tft.begin();
tft.setRotation(1);
}
void loop() {
for (int y = 0; y < HEIGHT; y++) {
for (int x = 0; x < WIDTH; x++) {
tft.drawPixel(x, y, x * y);
}
}
}