0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

秋月の1.3インチカラー液晶で遊ぶ(ST7789V2)(StampS3)(K-15560)(キャラクタ表示)

Last updated at Posted at 2024-04-14

ATM0130B3使用フルカラー液晶コントロールキット
[AE-ATM0130B3]
通販コード K-15560
発売日 2020/11/12

ST7789 ST7789V ST7789V2

ATM0130B3

目的
ST7789その互換機の標準的なライブラリになっている
Adafruit ST7735 + Adafruit GFXのインストール で
文字列を表示して遊ぶ

o_coq036.jpg

o_coq034.jpg

o_coq037.jpg



//spi_st7789_M5S3_1


//ヘッダーファイル
#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7789.h> // Hardware-specific library for ST7789
#include <SPI.h>


//定義
#define TFT_CS    1
#define TFT_RST   3
#define TFT_DC    5
#define TFT_MOSI  7
#define TFT_SCLK  9

Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);


//初期化
void setup() {

  //240x240の液晶を使用する。
  tft.init(240, 240);           // Init ST7789 240x240

}//setup


//メインループ
void loop() {

  // 画面表示をクリア
  tft.fillScreen(ST77XX_BLACK);

  // テキストサイズを設定
  tft.setTextSize(3);
  // テキスト色を設定
  tft.setTextColor(ST77XX_WHITE);
  // テキストの開始位置を設定
  tft.setCursor(0, 10);


  // 1行目に46を表示
  tft.println("StampS3");


  delay(1000); //1秒待つ

}//loop


0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?