Go Down

Topic: Due GUI (Graphical user interface) - [now community project] (Read 109495 times) previous topic - next topic



Already some bits towards 1.13 but I'm going off on a tangent at the moment as I work out how to do SDcard image file to LCD, copy flash to SDcard and vice versa.......

Oh and if anyone is using the CTE shield with a Mac I've converted their Windows only image uploader to MacOS using wine :D


Version 1.13 news....

I will upload over the next few days but added:


Basically this is an area of the screen which acts as a button. This can be used for detecting if someone has touched part of the screen so you could draw a menu and store it as a graphic then update the whole screen with this graphic and then use this button to detect the user pressing parts of it.


This takes 1, 2 or 3 images.... image, pressed image and alternative image

If image only is used then it displays that image and if it is clicked it registers
If pressed image is set then when the image is pressed it changes to the pressed image momentarily to signify being pressed
If alternative image is set then the image changes between image and alternative image acting like a checkbox.


May 25, 2013, 01:59 pm Last Edit: May 25, 2013, 03:05 pm by cowasaki Reason: 1
Version 1.13 further news....

Cycle button now has it's first option (bit 1)

if set then you can cycle in either direction by pressing first half of button or second half of button (by setting increment - or + you can alter whether 1st half is up/down with 2nd half always opposite).

AND now

(bit 2)

if set then it does the same for top/bottom half of button


Version 0.13 now uploaded with much better manual (still needs lots of work but the objects are all listed).

Addition of new objects:

The cycle button is supplemented with a cycleTEXTbutton which allows you to use an array of Strings as the list of options to select! You can also change the array once the object is drawn!

New ImageButton which allows lots of options of how it works:
1) Just as an image that can do something when clicked
2) As an image that changes momentarily when you click it and you can do something when clicked
3) As an image that changes momentarily then switches to an alternative image and vice versa allowing a boolean on/off which works automatically
4) As above without the momentary alternative image.

Now I've got the hang of recording the array's pointer so as to use the user's own array of strings I will be using this technique to produce a "menu" object, "list box" object and maybe a few more.


Hi and Many thanks for your extensive efforts -

is there any downloadable form or repository where i can download the files for testing and verifying - would be great as you really hit the spot by combining the essential libs to one Gui tooolbox
i'm thinking about an Dali based lighting control with an Due and 5" touch display which i will put on the playgroud once i have everything put together - your toolbox would be very helpfull for this project.

Kind regards, Mike

I have got checkboxs and a variant of them called cycleboxs working.  I am just working on an input box for text and will then release a downloadable version for testing whilst I finish the other planned bits.I have a demo running here that has three pages and allows people to switch between them and keep the variables consistent etc.  The input box effectively scrolls up the part of the screen with the input and creates a keyboard across the bottom half of the screen so quite a bit of work...  I will also be adding the option of PS2 and bluetooth keyboard support etc but that is for later.......

Now After returning from my trip i've downloaded and tested the UTFT lib with my CTE shield and 5"display - all demos were running without prob - then i dwonloaded and installed the DueGui 013 files and tested them -but did not succeed so far - assuming there is some missconfiguration from my side the question is, where do i have to change the physical wire definition for the display and the touch ..

on the UTFT 2.41 and CTE combination i had to change the following:
1.uncomment "#define CTE_DUE_SHIELD 1" in the HW_ARM_defines.h in the \hardware\arm folder of the UTFT library
2.Change the pinout to : UTFT myGLCD(CTE50,25,26,27,28);
UTouch myTouch(76,5,74,75,2);

to make the touch interface and display working - but where do i have to change this in the DueGUI - i didn't had the time to look throuch all the files to find it myself - so if someone has an idea, i'd really preciate some help.

kind regards, Mike


I'm not in front of my computer at the moment but in the demo there is a line which initialises everything,  something like initGui or something like that. I'll have a look tomorrow and give you a definite answer.



Here we go.....

at the start we have:

#include <DUEGUI.h>
DUEGUI DueGUI(CTE70);   // which is: DUEGUI TFT1(CTE70,25,26,27,28);

Where we setup which screen and if necessary alternative pin outs.....

Then inside the SETUP function we have:


Where we setup the pin-outs for the touch, SDcard and eeprom

void    InitGUI(byte tclk, byte tcs, byte tdin, byte dout, byte irq,int CS_pin, int Rate,int SD_pin);


I am trying to get this library to work with the Itead Studio ITDB02-5.0. Should I have to make a lot of changes or is there just some pin configs that I am getting wrong?
Rather people think you to be a fool than you open your mouth and confirm it.


Hi All.

I just received my 5.00" CTE LCD and a CTE Due shield.. Loaded version 0.13 of the great Due GUI and ran the example demo 02...looks great..one problem was that there was no touch response....bummer...want I found was that touch was working but the Y axis was inverted!   

Hmm.... checked the jumpers on the shield and they looked OK, at least from what I could find on the CTE website...so I poked around in the source for Due Gui and found there is a function for both X and y axis reversing....

I added this-- DueGUI.setReverseY(true) to   setup:

Code: [Select]
// Initialise DueGUI

Works now..

Can't wait until this is complete it is really very nicely done. I have written a fairly complicated (graphically) 4 screen GUI using the original work by Mr. Karlsen for the Uno32 by Chipkit...sorry Arduino , but I needed the speed for the screen redraws!..

Feature Request:

Add the ability to define line width in DrawLine.. I need fatter lines!  It can be done by drawing offset multiple lines but, that's a pain....

thanks for all your hard work!

David Garrison
Gaithersburg, MD USA


Yes you can reverse the X and Y axis just in case the touch screen is upside down :-)

I've been away from this project for a short while as I have had other things that need doing.  Hopefully will get back to it soon as I am using this as the basis for a new dash I am building for my car :D


After some testing, i discovered the screen is jittering - swapped out the shield and LCD without success - are there similar experience out here ?
It seems the screen is redrawn without sync or buffering.

Kind regards, Mike


This is an example of a call on the current version of the library:


DueGUI.addPanel(0,0,799,50,clrBlue,clrWhite,clrWhite,2,"Board   control   menu",280,8,BVS_34,visible,URNnull); /* URNnull!!!!!???? */

The final attribute "URNnull" was added  but it was working for hours after being added....

In DUEGUI example, there are an error:

"extern uint8_t SmallFont[];
#include "SPI.h"
#include <UTFT.h>
UTFT TFT1(CTE70,25,26,27,28); "

Correct form:

"extern uint8_t SmallFont[];
#include "SPI.h"
#include <UTFT.h>
DUEGUI TFT1(CTE70,25,26,27,28); "

¿ Somebody can help me ?
I'm new to arduino and I a little lost.



What is the error that you get?
The URNnull means that the object has no Unique Reference Number assigned to it and you cannot refer to it later. You will use a URN if you need to make reference to the object later in your code. URNnull should not give an error. The URN is defined at the top of the file. It is just an int number.
Rather people think you to be a fool than you open your mouth and confirm it.


The error are in that prototipe include.h refer addPanel with n arguments, but when call function in demo example, pass n+1 arguments and go to error.

The example that there are in webpage of Due GUI driver don't compile correctly for me.

I'm a new user of Arduino, but in the past,I used ATmel and Microchip, and GCC compiler.

I think that there are an error, but I'm not sure if I unknow this platform.

Please, somebody can send DUE Gui library old to my email ? thanks a lot txpto@hotmail.com


Go Up