Arduinoでタッチディスプレイを使用する
Arduinoで使用できるタッチ対応の240x320ディスプレイシールドのサンプルスケッチを動かしてみる。
Kuman Arduino用ディスプレイ タッチスクリーン 2.8 inch 320*240ピクセル LCD 16bit Arduino Nano Mega2560適用ディスプレイ K60
付属品、外観
- タッチペン
- データミニディスク
ミニディスクの中には、データシート、画像変換ツール、ユーザーマニュアル、サンプルプログラム、ライブラリが入っています。


接続
シールドタイプになっているので、microSDスロットとArduinoのUSBコネクタの位置が同じになるようにはめ込みます。傷が付いているのは画面ではなく画面保護シール。

ライブラリのインストール
ミニディスクの中に入っているライブラリではArduino IDEでコンパイルエラーとなるため、メーカー公式からダウンロードしてきました。
http://www.kumantech.com/help/documents-and-recources_h0037.html
LCD Touch ScreenのK60を選択するとダウンロードサイトに移動するので「ZIPとしてダウンロードする」をクリック。


ダウンロードしたファイルを解凍してできた、
「2.8inch_Arduino_8bit_ILI9341_MAR2808_V1.0」→「1-Arduino_Test_Program」→「Arduino_Demo_UNO&Mega2560_8BIT」→「Install libraries」フォルダの中身を全てローカルのArduinoプロジェクト→「libraries」フォルダへコピー。
Arduino IDEを起動すれば利用可能になります。
サンプルプログラムの実行
スケッチ例:LCDWIKI_KBV/Example/Example_02_colligate_testを実行してみる。
Arduinoを接続しポートを選択、スケッチ例は以下の通り選択。

27行目のコメントアウトを解除してArduinoに書き込み。

実行結果
基本的な図形や文字、幾何学的な図形なども高速に描画できていました。

スケッチ例:Example_07_show_bmp_picture/show_bmp_pictureも実行してみました。
綺麗に表示できてます。

ディスカッション
コメント一覧
まだ、コメントがありません