Gemalto is now part of the Thales Group, find out more.

You are here

ConceptBoard: Arduino TFT Shield Demo

Tutorial, May 22, 2014 - 5:43pm, 3700 views

Concept Board Arduino TFT Shield
How to use the Adafruit Arduino 1.8’’ TFT Shield with the Concept Board

Introduction

The library and demo application were created by student workers at the Gemalto M2M Application Engineering department in Berlin - first of all Roman Wedemeier.

Prerequisites

Hardware

• Concept Board connected to a Windows 7 PC

• Adafruit 1.8’’ TFT shield with RST pin tied to the 5V pin

Software

• Eclipse Juno with MTJ installed

• Gemalto EHSx Software Development Kit

• DisplayDriver and DisplayTest projects

Display library

Import Library and demo projects

Import DisplayDriver and DisplayTest into your workspace: 

Choose File->Import…

open import dialog

General->Existing Projects into Workspace

import dialog

Select your project directory and the projects you want to import

choose project

Click Finish to import the selection into your workspace

Start demo application

Before starting the demo application, please check what kind of display you have. Depending on which display you are using you can to change the type of label to “BLACK_LABEL” or “RED_LABEL” in the DTest.java  in line 45.

choose red label or black label

Create a new run configuration for DisplayTest:

Right-click the DisplayTest project. Choose Run As -> Run Configurations… .

create run configuration

Double-click Emulated JavaME MIDlet in the left menu of the new window. Set the executable to MIDlet and click “Search…”. In the new Window select DTest – (default package) and click OK. Adjust the Name of your new configuration, click Apply and Run afterwards.

select midlet for run configuration

You are now ready to launch the DTest MIDlet with your new Run Configuration.

Use demo application

On startup the demo displays text on the TFT.

When you press BTN-A the demo switches to graphical mode where you can move a little bird around with the joystick. Pressing the joystick changes the background image.

To end the application press BTN-B.

Use your own images

You can store new images in the project’s subfolder src/res or directly in the module using the Module Exchange Suite.

The images must be 16bit BMP (RGB565) encoded without "color space information". For further information please see  the class adafruitST7735R.ImageBMP.

You’ll need to adjust the image paths in DTest.java to match your new image file names.

Further information

• Adafruit 1.8’’ TFT shield - https://www.adafruit.com/products/802

• Java User’s Guide - ehsx_java_useraguid_v05.pdf

Feel free to share your experience with the Display Library and the Demo Application :-)

Jędrzej Gemalto Moderator's picture
Jędrzej Gemalto...

Great work!

Alopez's picture
Alopez

It's really nice!!!!!

Somewhere over the rainbow!!! Looking for the Oz Land!!!

robin.stridh's picture
robin.stridh

I'ts worth mentioning that you may need to configure the SPI interface with
AT^SCFG="GPIO/mode/SPI","std"
or the demo will not work. (This could be the default, but if you experimented with GPIOs the pins could be reserved for other functions)

Paul Mock