1
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?

[失敗]秋月の1.3インチカラー液晶で遊ぶ(ST7789V2)(STM32C011F4P6(16K))K-15560 ATM0130B3

Last updated at Posted at 2025-09-02

結果(失敗)(容量が足りない

Screenshot from 2025-09-03 04-09-12.png

Screenshot from 2025-09-03 04-09-52.png

イメージ

Screenshot from 2025-08-29 06-35-25.png

プログラム(STM32C0116-DKとプログラム、構成は、同じ



//spi_st7789_C0116_1


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


//定義
#define TFT_CS PA_4
//#define TFT_RST 9   // Or set to -1 and connect to Arduino RESET pin
#define TFT_RST -1  // Or set to -1 and connect to Arduino RESET pin
#define TFT_DC PA_6
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);
//Adafruit_ST7789 tft = Adafruit_ST7789(&SPI, TFT_CS, TFT_DC, TFT_RST);
//Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, PA_7, PA_5,TFT_RST);

//初期化
void setup() {

  // SPIの初期化
  SPI.setMISO(PB_6);
  //SPI.beginTransaction( SPISettings(8000000, MSBFIRST, SPI_MODE0) );

  //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("C011");


  delay(3000);  //1秒待つ

}  //loop



1
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
1
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?