1
1

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.

Arduino IDE + Raspberry Pi Pico + Pico_Breadboard_Kit

1
Posted at

概要

geeekpiのPico_Breadboard_Kitを入手しました。

Pico C/C++ SDKで作成されたデモプログラムの表示画面です。

IMG_20250316_101038592.jpg

詳細

Arduino IDE + Raspberry Pi Picoで画面を表示してみます。

ST9996Sのライブラリをインストールします。

ST7796S Library.jpg

サンプルプログラム ST7796S_demo を開きます。

ST7796S_demo.jpg

サンプルプログラムを下記の通り修正します。

ST7796S_demo.ino
// Define display pin connections
- #define TFT_CS        10
- #define TFT_DC         8
- #define TFT_RST        9 // Or set to -1 and connect to Arduino RESET pin
+ #define TFT_CS         5
+ #define TFT_DC         6
+ #define TFT_RST        7 // Or set to -1 and connect to Arduino RESET pin
+ #define TFT_SCLK       2
+ #define TFT_MOSI       3

// Initialize the display
- Adafruit_ST7796S display(TFT_CS, TFT_DC, TFT_RST);
+ Adafruit_ST7796S display(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);

show_canvas(); はコメントアウトしました。

#if !defined(__AVR__)
  // we dont have the RAM or Flash for canvas
-  show_canvas();
+  //show_canvas();
#endif

表示できました。

IMG_20250316_100640156.jpg

まとめ

Raspberry Pi Pico の GPIOピンと TFT スクリーンの接続は下表の通りです。

Raspberry Pi Pico SPI信号名 TFT スクリーン 説明
GP2 SCLK CLK クロック
GP3 MOSI DIN メイン出力/サブ入力
GP4 MISO メイン入力/サブ出力
GP5 CS CS チップ セレクト
GP6 DC データ/コマンド
GP7 RST RST リセット

IMG_20250319_141529393.jpg

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?