GTT Design: Screen Tracking Example

GTT Designer Software Support

Moderator: Mods

Post Reply
Daniel Divino
Matrix Orbital
Matrix Orbital
Posts: 247
Joined: Thu Sep 24, 2015 9:38 am

GTT Design: Screen Tracking Example

Post by Daniel Divino »

In this example, a simple menu interface is generated and deployed to a GTT43A display using the GTT Designer Software tool.

Multiple elements are implemented in the project, allowing a user to navigate between GTT products, while also keeping track of what screen is being currently displayed. This example utilizes scripts to transition between screens, along with the echo command to return what screen is being displayed.

Arduino C was used to write the code for this example. The primary function of the code is to read the return messages whenever the GTT transitions between screens. The Arduino will then inform the user what screen is being displayed, and will update the GTT with new information when necessary.

This example demonstrates the power of the Matrix Orbital GTT series, when combined with the GTT Designer software tool, and a basic microcontroller.

GTT Firmware Version: 1.2.0.7801
GTT Designer Version: 2.5.0.7797
Controller:Arduino Uno
Menu Screen.png
Menu Screen.png (107.02 KiB) Viewed 10956 times
Attachments
Screen Tracking Designer Files and Image Files.zip
(8.61 MiB) Downloaded 632 times
Screen Tracking Arduino Files.zip
(3.02 KiB) Downloaded 632 times
Daniel Divino
Technical Support
Matrix Orbital

Haz
LCD Geek
Posts: 38
Joined: Wed Jun 28, 2017 8:52 am

Re: GTT Design: Screen Tracking Example

Post by Haz »

I am trying to implement this demo, but i do not use Arduino. Do you have the C code for it? I am using an ARM M4, so any guidance on the c code or flow would be appreciated. i cannot open the file which is part of this demo.
Specifically, i am trying to understand the functionality of the Echo. I use I2C, and i am not sure how I2C can echo, or which command i need to send from the master to get the echo?
Any feedback is appreciated.

Otherwise, i will have to implement all the screen transitions through my program on the MCU master, just so i know the screen number, which is a lot of unnecessary overhead.

Daniel Divino
Matrix Orbital
Matrix Orbital
Posts: 247
Joined: Thu Sep 24, 2015 9:38 am

Re: GTT Design: Screen Tracking Example

Post by Daniel Divino »

Hi Haz,

The GTT has an "Echo Command" that can be used to test communication. When the GTT receives an Echo command, it will simply return whatever it was requested to echo via the protocol it was requested on. e.g if you request an echo on a serial line, the GTT will return the specified value on the serial line.

Using the GTT Designer's Pre and Post scripting features, echoed messages can be used to determine if the GTT has changed screens. When developing a screen in the Designer, you can add a post script to Echo a value, like a screen number. On your controller's side, you would have to periodically check the I2C's return line to see if an Echo message was sent from the GTT. Once your controller is notified that a screen transition has occurred, it can decide what to do next.

I've attached a flow chart to demonstrate the coding approach that was taken with this appnote:
Screen Tracking Appnote flow chart.png
Screen Tracking Appnote flow chart.png (26.28 KiB) Viewed 10598 times
If you download the Arduino environment, and open the screen tracking program, you should be able to follow along fairly easily. The Arduino will initialize variables, and then start a loop parser, checking whether or not the GTT has changed it's screen, among other things. When the GTT has changed screens, the Arduino will be notified, and determine what to do next using a case structure.

Cheers,
Daniel
Daniel Divino
Technical Support
Matrix Orbital

Post Reply