Pages: 1 ... 3 4 [5] 6 7 ... 9   Go Down
Author Topic: Due GUI (Graphical user interface) - [now community project]  (Read 27130 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The code library takes code from CTE's supplied library which in turn takes in from Henning Karlsen's UTFT and Touch libraries.  I then added lots of extra code which allows a simpler development by reducing the number of libraries required.  I have a 5" and 7" screen plus numerous versions of CTE's shield plus a shield I made myself which is basically a simplified version.

I will be carrying on with the development shortly with the addition of several new objects as I use this for the development of an electronic dash board.
Logged

Laguna Hills, CA 92653
Offline Offline
Full Member
***
Karma: 0
Posts: 112
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, two much-different levels of support, one is basic drawing,
and the DueGUI is an interface-object manipulation User Interface.

However, at some fundamental level, they both take touch input,
and both erase and draw pixels on areas of the screen, right?

And, the Due is substantially faster, but both use a parallel
(8 or 16 bit) interface to write the screen, rather than an SPI
type serial input?

Thanks.
Logged

Cheers, Gary
Due for controlling Electric car charging.
Nissan LEAF - Mini Quick Charge (mQC)

Laguna Hills, CA 92653
Offline Offline
Full Member
***
Karma: 0
Posts: 112
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Several years ago I made a simple library of gauges that were used
by the Aptera electric 3-wheel "car" (vehicle), while it was in the
earlier stages of testing, when they just needed "something" to
get them going.

Now, I am collaborating on a mini-QC for the Nissan LEAF's QC port,
around 12 kW to start, and hopefully up to twice that.

Your generous hard work for the DueGUI will be appreciated by many.
Thanks
Logged

Cheers, Gary
Due for controlling Electric car charging.
Nissan LEAF - Mini Quick Charge (mQC)

Centurion RSA
Offline Offline
Full Member
***
Karma: 0
Posts: 166
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
However, at some fundamental level, they both take touch input,
and both erase and draw pixels on areas of the screen, right?

And, the Due is substantially faster, but both use a parallel
(8 or 16 bit) interface to write the screen, rather than an SPI
type serial input?

Yes it is true, but the CTE LCD back plane pcb is not laid out the same as the Iteadstudio stuff for instance. At the low level, the CTE makes use of the SPI interface to get to the fonts that are in the chip. The others do not use the SPI. At the driver level a lot has changed not just with hardware layout and pins but also with the SPI and the way it uses it. It will not be easy to convert back to another setup (in my opinion at least).
The 8/16 bit interface is true only for the lcd driver chips that allow that. Some of the lcd driver chips that the Karlsen UTFT library support are serially driven.
My advice, get some CTE stuff and enjoy the library.
« Last Edit: August 28, 2013, 03:03:56 pm by Marius » Logged

Rather people think you to be a fool than you open your mouth and confirm it.

Laguna Hills, CA 92653
Offline Offline
Full Member
***
Karma: 0
Posts: 112
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, now I am confused.
I do not understand how to "get some CTE stuff".

Will these two displays and the Shield that were suggested work OK?
These do not seem to mention CTE.

Quote
it has been stated that the library works with the 5" and 7"
CTE (Coldtear Electronics) screens. they can be found here:

7" screen: http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=111008432389
5" screen: http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=111005370687

to use the screens, you want to make sure to get
the "CTE DUE Sheild" found here:
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=121057447668

i would assume there would not be too many issues using the other size screens, but that wold have to be verified.
Logged

Cheers, Gary
Due for controlling Electric car charging.
Nissan LEAF - Mini Quick Charge (mQC)

Laguna Hills, CA 92653
Offline Offline
Full Member
***
Karma: 0
Posts: 112
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Pardon, the Shield says CTE, but the displays do not.
Logged

Cheers, Gary
Due for controlling Electric car charging.
Nissan LEAF - Mini Quick Charge (mQC)

Centurion RSA
Offline Offline
Full Member
***
Karma: 0
Posts: 166
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You get the CTE stuff from ebay as the links indicated. As far as I know that is the only way to buy from them. The library works with the CTE stuff smiley
Logged

Rather people think you to be a fool than you open your mouth and confirm it.

Centurion RSA
Offline Offline
Full Member
***
Karma: 0
Posts: 166
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Pardon, the Shield says CTE, but the displays do not.

I have a 7" and it has a CTE label on. It does come from them although it might not seem so at a glance.
Logged

Rather people think you to be a fool than you open your mouth and confirm it.

Laguna Hills, CA 92653
Offline Offline
Full Member
***
Karma: 0
Posts: 112
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, I found the ColdTears ebay "store":
http://stores.ebay.com/coldtears-electronics-store

Fortunately, this is the stuff that I just "invested in" (ordered too much).

Thanks all, with the Due on order, this is only my second day on the forum, and yesterday was just reading about all the things that
are being reported as not working for some folks.

I appreciate your help, and I will enjoy using this growing library.

Are you using compile-time "#ifdef" type sections to support
different displays (to keep down the size of the loaded code), or
case statements which compile and load all the options?

Later, Gary
Logged

Cheers, Gary
Due for controlling Electric car charging.
Nissan LEAF - Mini Quick Charge (mQC)

Centurion RSA
Offline Offline
Full Member
***
Karma: 0
Posts: 166
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Gary
An important file to look at is the memorysaver.h and the rest is done when you initialize the display. Very simple one line to configure the whole lot. Some folks had to change pin definitions but this is also very easy.
Logged

Rather people think you to be a fool than you open your mouth and confirm it.

Offline Offline
Full Member
***
Karma: 3
Posts: 104
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

it appears there are problems using this library with the newly released 1.5.3 IDE. there are no issues with 1.5.2. it appears to be a result of changes in the string library.

here are the compile errors i get when compiling the "DueDUI_demo":

Code:
DueGUI_demo.ino: In function 'void setup()':
DueGUI_demo:375: error: conversion from 'int' to 'String' is ambiguous
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:61: note: candidates are: String::String(const __FlashStringHelper*)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:59: note:                 String::String(const char*)

if i remove the line
Code:
DueGUI.db_St(1,"\n\nSERIAL CONNECTED AT 115200\nCompiled at: ");DueGUI.db_St(1,__TIME__);DueGUI.db_St(1," on: ");DueGUI.db_St(1,__DATE__); DueGUI.db_St(1,"\nVersion number: ");DueGUI.db_St(1,(int)VERSION);DueGUI.db_St(1,"");

then i get these errors:

Code:
F:\Documents\Arduino\libraries\DUEGUI\DUEGUI.cpp: In member function 'String DUEGUI::displayNumFormat(int, int)':
F:\Documents\Arduino\libraries\DUEGUI\DUEGUI.cpp:4195: error: call of overloaded 'String(int&, int)' is ambiguous
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:73: note: candidates are: String::String(double, int)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:72: note:                 String::String(float, int)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:71: note:                 String::String(long unsigned int, unsigned char)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:70: note:                 String::String(long int, unsigned char)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:69: note:                 String::String(unsigned int, unsigned char)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:68: note:                 String::String(int, unsigned char)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:67: note:                 String::String(unsigned char, unsigned char)
F:\Documents\Arduino\libraries\DUEGUI\DUEGUI.cpp: In member function 'String DUEGUI::IntegerToString(long int, int, char)':
F:\Documents\Arduino\libraries\DUEGUI\DUEGUI.cpp:4206: error: call of overloaded 'String(long int&, int)' is ambiguous
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:73: note: candidates are: String::String(double, int)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:72: note:                 String::String(float, int)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:71: note:                 String::String(long unsigned int, unsigned char)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:70: note:                 String::String(long int, unsigned char)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:69: note:                 String::String(unsigned int, unsigned char)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:68: note:                 String::String(int, unsigned char)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:67: note:                 String::String(unsigned char, unsigned char)
F:\Documents\Arduino\libraries\DUEGUI\DUEGUI.cpp: In member function 'void DUEGUI::setObjectDate(int, int, int, int, bool, bool)':
F:\Documents\Arduino\libraries\DUEGUI\DUEGUI.cpp:5620: error: call of overloaded 'String(int&, int)' is ambiguous
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:73: note: candidates are: String::String(double, int)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:72: note:                 String::String(float, int)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:71: note:                 String::String(long unsigned int, unsigned char)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:70: note:                 String::String(long int, unsigned char)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:69: note:                 String::String(unsigned int, unsigned char)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:68: note:                 String::String(int, unsigned char)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:67: note:                 String::String(unsigned char, unsigned char)
F:\Documents\Arduino\libraries\DUEGUI\DUEGUI.cpp:5622: error: call of overloaded 'String(int&, int)' is ambiguous
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:73: note: candidates are: String::String(double, int)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:72: note:                 String::String(float, int)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:71: note:                 String::String(long unsigned int, unsigned char)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:70: note:                 String::String(long int, unsigned char)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:69: note:                 String::String(unsigned int, unsigned char)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:68: note:                 String::String(int, unsigned char)
F:\arduino-1.5.3\hardware\arduino\sam\cores\arduino/WString.h:67: note:                 String::String(unsigned char, unsigned char)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sweet!!

Very impressive work.
I'm having problems to run it, when i try to run i get a bunch of errors on the UTFT library.

DueGUI_demo:42: error: 'class UTFT' has no member named 'stopTimer'

And so on..  smiley-confuse
Logged

Forum Administrator
Milano, Italy
Offline Offline
Sr. Member
*****
Karma: 22
Posts: 292
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@wallaceb

there are two different issues here:

ISSUE 1
The meaning pieces of code are:

the example:
Code:
[....cut....]
#define VERSION 0.13
[....cut....]
DueGUI.db_St(1,(int)VERSION);
[....cut....]

the db_St function defined as:
Code:
  void    db_St(int level, String out);

the example tries to pass an integer to a function that receive a String. As you can see the floating point number 0.13 is first converted to int with a cast and, after that, the compiler try to instantiate the String object using the int value as a pointer to a character array.
In any case, even with 1.5.2, this is not the correct way to instantiate the String.

There are two possible ways to solve the problem, this:

Code:
[....cut....]
#define VERSION "0.13"
[....cut....]
DueGUI.db_St(1, VERSION);
[....cut....]

or, if the floating point number is *really* needed, this:

Code:
[....cut....]
#define VERSION 0.13
[....cut....]
DueGUI.db_St(1,String(VERSION));
[....cut....]

IMHO this is not a issue related to the String class and it should be fixed in the example code.

ISSUE 2

The second problem instead is in the new String class, I fixed it here

https://github.com/arduino/Arduino/commit/c86eed942dd3d7d0bced4fb26fb28ee57fccff07

and will be available for the next IDE release.
If you want to check it out, you can download the updated String class here:

https://raw.github.com/arduino/Arduino/c86eed942dd3d7d0bced4fb26fb28ee57fccff07/hardware/arduino/sam/cores/arduino/WString.h
https://raw.github.com/arduino/Arduino/c86eed942dd3d7d0bced4fb26fb28ee57fccff07/hardware/arduino/sam/cores/arduino/WString.cpp

and replace the files in you arduino installation folder:

hardware/arduino/sam/cores/arduino/WString.cpp
hardware/arduino/sam/cores/arduino/WString.h

Hope this solve all the issues, and thanks for finding the regression in the String class!


Logged

C.

Laguna Hills, CA 92653
Offline Offline
Full Member
***
Karma: 0
Posts: 112
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I got the Due Shield and the 5" display from CoalTears Electronics in Hong Kong.

I downloaded your zip file from the first post, and unzipped it, and found
two libraries, DUEGUI and ArduinoDueRTCLibrary, and copied those to the
.../adruino-1.5.3/libraries/ folder.

I tried to compile, and the Compile complained that UTFT.h was not found.

I found a UTFT.pdf in your files, and it seemed to suggest that UTFT might be
found at ... http://www.henningkarlsen.com/
I copied the UTFT.rar from there, and now I get these errors:

--------------------------------------
Arduino: 1.5.3 (Windows Vista), Board: "Arduino Due (Programming Port)"

DueGUI_demo.ino: In function 'void TC3_Handler()':
DueGUI_demo:42: error: 'class UTFT' has no member named 'stopTimer'
DueGUI_demo:55: error: 'class UTFT' has no member named 'anyClockVisible'
DueGUI_demo:58: error: 'class UTFT' has no member named 'setObjectTime'
DueGUI_demo:59: error: 'class UTFT' has no member named 'setObjectDate'
DueGUI_demo:60: error: 'class UTFT' has no member named 'setObjectTime'
DueGUI_demo:61: error: 'class UTFT' has no member named 'redrawObject'
DueGUI_demo:62: error: 'class UTFT' has no member named 'redrawObject'
DueGUI_demo:63: error: 'class UTFT' has no member named 'drawHands'
DueGUI_demo:70: error: 'class UTFT' has no member named 'restartTimer'
DueGUI_demo.ino: In function 'void setup()':
DueGUI_demo:94: error: 'class UTFT' has no member named 'SPI_Flash_init'
DueGUI_demo:96: error: 'class UTFT' has no member named 'UTouch'
DueGUI_demo:97: error: 'class UTFT' has no member named 'InitTouch'
DueGUI_demo:98: error: 'class UTFT' has no member named 'setPrecision'
DueGUI_demo:98: error: 'PREC_MEDIUM' was not declared in this scope
DueGUI_demo:101: error: 'class UTFT' has no member named 'addPanel'
DueGUI_demo:101: error: 'BVS_34' was not declared in this scope
DueGUI_demo:102: error: 'class UTFT' has no member named 'addButton'
DueGUI_demo:102: error: 'BVS_28' was not declared in this scope
DueGUI_demo:103: error: 'class UTFT' has no member named 'addButton'
DueGUI_demo:104: error: 'class UTFT' has no member named 'addButton'
DueGUI_demo:105: error: 'class UTFT' has no member named 'addButton'
DueGUI_demo:106: error: 'class UTFT' has no member named 'addButton'
DueGUI_demo:107: error: 'class UTFT' has no member named 'addDigitalClock_Time'
DueGUI_demo:108: error: 'class UTFT' has no member named 'addDigitalClock_Date'
DueGUI_demo:111: error: 'class UTFT' has no member named 'addAnalogueClock'
DueGUI_demo:113: error: 'class UTFT' has no member named 'redrawAllObjects'
DueGUI_demo:118: error: 'class UTFT' has no member named 'startTimer'
DueGUI_demo.ino: In function 'void loop()':
DueGUI_demo:128: error: 'class UTFT' has no member named 'checkAllButtons'
DueGUI_demo:132: error: 'class UTFT' has no member named 'redrawAllObjects'
DueGUI_demo:145: error: 'class UTFT' has no member named 'makeObjectInvisible'
DueGUI_demo:146: error: 'class UTFT' has no member named 'makeObjectInvisible'
DueGUI_demo:147: error: 'class UTFT' has no member named 'makeObjectInvisible'
DueGUI_demo:148: error: 'class UTFT' has no member named 'makeObjectVisible'
DueGUI_demo:153: error: 'class UTFT' has no member named 'makeObjectInvisible'
DueGUI_demo:154: error: 'class UTFT' has no member named 'makeObjectVisible'
DueGUI_demo:155: error: 'class UTFT' has no member named 'makeObjectVisible'
DueGUI_demo:156: error: 'class UTFT' has no member named 'makeObjectVisible'

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.

------------------------
So, it would seem that I have the wrong UTFT library?

I think somebody a few posts above had the same problem,
but I did not see an answer.

Please detail, preferably in the first post, exactly what one
needs to do to get your example running in IDE 1.5.3.

THANKS, Gary
Logged

Cheers, Gary
Due for controlling Electric car charging.
Nissan LEAF - Mini Quick Charge (mQC)

Laguna Hills, CA 92653
Offline Offline
Full Member
***
Karma: 0
Posts: 112
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Please, does anybody have this DueGUI working with 1.5.3?

If so, what is needed to get it to compile, please?

If not, what is needed with 1.5.2 to get DueGUI to work?

----------
I tried renaming the WString files to WString-Orig and pasting
in a copy of the "fixed" WString, as suggested, but then even
a null Sketch would not compile with 1.5.3 IDE.

Is there a WString bug in 1.5.3 that needs correcting?

Thanks, Gary
Logged

Cheers, Gary
Due for controlling Electric car charging.
Nissan LEAF - Mini Quick Charge (mQC)

Pages: 1 ... 3 4 [5] 6 7 ... 9   Go Up
Jump to: