#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#include <Wire.h>
#include <SPI.h>
#define TFT_CS 5//6//PA1
#define TFT_DC 7//PB3
//#define TFT_LED PB0
//#define TFT_RST 3//PB4
#define TFT_MOSI 35//16
#define TFT_CLK 36//15
#define TFT_MISO 37//14
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_MISO);
#define BLACK 0X0000
#define RED 0xF800
#define GREEN 0x07E0
#define CELESTE 0x79E0
#define BLUE2 0x0110
#define BLUE 0x102E
#define CYAN 0x07FF
#define CYAN2 0x3333
#define YELLOW 0xFFE0
#define ORANGE 0xFD20
#define ORANGE2 0xFE52
#define NARANJO 0x1358
#define GREENYELLOW 0xAFE5
#define DARKGREEN 0x04E0 //0x03E0
#define WHITE 0xFFFF
#define GRIS 0x5AEB
#define VIOLETA 0xFCFD
#define DARKGREY 0x7BEF
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32-S2!");
tft.begin();
tft.setRotation(0);
// tft.fillScreen(BLUE);
tft.setTextSize(2);
tft.setTextColor(GREEN);
tft.setCursor(10, 10);
tft.print("moviendo.. este es esp32-s2-mini-1");
}
void loop() {
for (int x = 0; x < 180; x = x + 20) {
tft.setTextSize(2);
tft.setTextColor(WHITE, BLACK);
tft.setCursor(x, 150);
tft.print("> > >");
tft.setTextColor(BLACK, BLACK);
tft.setCursor(x - 20, 150);
tft.print("> > >");
//delay(100);
}
// if (int x = 290) {
for (int x = 180; x > 0; x = x - 20) {
tft.setTextSize(2);
tft.setTextColor(WHITE, BLACK);
tft.setCursor(x, 150);
tft.print("< < <");
tft.setTextColor(BLACK, BLACK);
tft.setCursor(x + 20, 150);
tft.print("< < <");
//delay(100);
}
}