/**
First demo for FT6206 Capactive Touch Screen on Wokwi. Enjoy!
https://wokwi.com/arduino/projects/311598148845830720
*/
/***************************************************
This is our touchscreen painting example for the Adafruit ILI9341
captouch shield
----> http://www.adafruit.com/products/1947
Check out the links above for our tutorials and wiring diagrams
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution
****************************************************/
#include <TFT_eSPI.h>
#include <SPI.h> // this is needed for display
#include <Wire.h> // this is needed for FT6206
#include "sample_images.h"
// The display also uses hardware SPI, plus #9 & #10
#define TFT_CS 15
#define TFT_DC 2
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TEXT "aA MWyz~12" // Text that will be printed on screen in any font
#include "Free_Fonts.h" // Include the header file attached to this sketch
#include "SPI.h"
#include "TFT_eSPI.h"
// Use hardware SPI
TFT_eSPI tft = TFT_eSPI();
int i = 0 ;
void setup(void) {
tft.init();
tft.setRotation(0);
tft.fillScreen(TFT_BLACK);
tft.setTextColor(TFT_WHITE, TFT_BLACK);
}
void loop() {
tft.setCursor(0, 10+(i*10), 1);
tft.println("Hello World!");
tft.setCursor(0, 20+(i*10), 2);
tft.println("Hello World!");
tft.setFreeFont(TT1);
tft.drawString(sFF1, 80, 60, GFXFF);
tft.setFreeFont(GLCD);
tft.drawString(sFF1, 80, 100, GFXFF);
tft.setFreeFont(FM9);
tft.drawString(sFF1, 80, 140, GFXFF);
tft.setTextColor(TFT_GREEN, TFT_BLACK);
delay(5000);
i++ ;
}