目的
カラー液晶のテスト
TFT_CS 14
TFT_RST 15
TFT_DC 32
CLK-18
MOSI-23
//st7735_text_test1_esp32
//インクルド
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library for ST7735
#include <SPI.h>
//ピン定義
//#if defined(ARDUINO_FEATHER_ESP32) // Feather Huzzah32
#define TFT_CS 14
#define TFT_RST 15
#define TFT_DC 32
//画面の定義
// For 1.44" and 1.8" TFT with ST7735 use:
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
//初期化
void setup(void) {
//画面の初期化
// Use this initializer if using a 1.8" TFT screen:
tft.initR(INITR_BLACKTAB); // Init ST7735S chip, black tab
//画面のクリア
tft.fillScreen(ST77XX_BLACK);
// テキストサイズを設定
tft.setTextSize(3);
// テキスト色を設定
tft.setTextColor(ST77XX_WHITE);
// テキストの開始位置を設定
tft.setCursor(0, 10);
// 1行目にUNOを表示
tft.println("ESP32");
} //setup
//メインルーチン
void loop() {
delay(1);
} //loop