LoginSignup
7
7

More than 5 years have passed since last update.

Raspberry Pi に高精細IGZOパネルを繋げてみた。

Last updated at Posted at 2015-09-09

2015年8月1,2日に東京ビックサイトで開催されたMaker Faire Tokyo 2015で、Raspberry Pi向け高精細IGZOパネルを購入しました。

Raspberry Pi用IGZOディスプレイパネル

7インチのWUXGA(1200×1920ピクセル)ディスプレイです。デフォルトでは縦長(Portrait)、設定によって横長(Landscape)に変更できます。
ただタブレット端末のようにon-the-flyで画面の縦横を変えられず、Raspbian起動時に読み込まれるconfig.txtファイルを書き換える必要があります。またEDIDによる自動判別に対応していません。

これのconfig.txtの書き換えが面倒なのでシェルスクリプトを書きました。

config.txtの編集

config.txtは /boot ディレクトリにあります。
まずオリジナルを複数コピーします。

$ cd /boot/
$ sudo cp config.txt config.txt.original
$ sudo cp config.txt config.txt.IGZO_0
$ sudo cp config.txt config.txt.IGZO_1
$ sudo cp sonfig.txt config.txt.IGZO_2
$ sudo cp sonfig.txt config.txt.IGZO_3

次に config.txt.IGZO_0config.txt.IGZO_3 に下記の記述を追加します。

config.txt.IGZO_0
hdmi_pixel_freq_limit=200000000
hdmi_timings=1200 0 164 8 32 1920 0 12 2 6 0 0 0 60 0 163430000 0
hdmi_drive=2
disable_overscam=1
max_framebuffer_width=1920
max_framebuffer_height=1920

# Portrate
display_rotate=0
framebuffer_width=1200
framebuffer_height=1920
config.txt.IGZO_1
hdmi_pixel_freq_limit=200000000
hdmi_timings=1200 0 164 8 32 1920 0 12 2 6 0 0 0 60 0 163430000 0
hdmi_drive=2
disable_overscam=1
max_framebuffer_width=1920
max_framebuffer_height=1920

# Landscape
display_rotate=1
framebuffer_width=1920
framebuffer_height=1200
config.txt.IGZO_2
hdmi_pixel_freq_limit=200000000
hdmi_timings=1200 0 164 8 32 1920 0 12 2 6 0 0 0 60 0 163430000 0
hdmi_drive=2
disable_overscam=1
max_framebuffer_width=1920
max_framebuffer_height=1920

# Portrate
display_rotate=2
framebuffer_width=1200
framebuffer_height=1920
config.txt.IGZO_3
hdmi_pixel_freq_limit=200000000
hdmi_timings=1200 0 164 8 32 1920 0 12 2 6 0 0 0 60 0 163430000 0
hdmi_drive=2
disable_overscam=1
max_framebuffer_width=1920
max_framebuffer_height=1920

# Landscape
display_rotate=3
framebuffer_width=1920
framebuffer_height=1200

シェルスクリプトの作成

ホームディレクトリに戻って次のシェルスクリプトを作成します。スクリプト名は IGZO.sh です。

IGZO.sh
#!/bin/bash

case $1 in
    0) sudo cp /boot/config.txt.IGZO_0 /boot/config.txt;;
    1) sudo cp /boot/config.txt.IGZO_1 /boot/config.txt;;
    2) sudo cp /boot/config.txt.IGZO_2 /boot/config.txt;;
    3) sudo cp /boot/config.txt.IGZO_3 /boot/config.txt;;
    9) sudo cp /boot/config.txt.original /boot/config.txt;;
esac

case $2 in
    "r" ) sudo reboot;;
    "h" ) sudo halt;;
esac

次に実行権限を与えます。

$ chmod +x IGZO.sh

使い方

コマンド IGZO.sh の最初の引数(0,1,2,3,9)で config.txt を書き換え、2番目の引数(r,h)で再起動かシャットダウンかを選択します。

例1) ポートレート画面で再起動。

$ ./IGZO.sh 0 r

例2) 標準設定に戻してシャットダウン。

$ ./IZGO.sh 9 h
7
7
1

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