Go Down

Topic: AWind: GUI library for Arduino - TFT and OLED Displays (Read 49014 times) previous topic - next topic

AndreiDegtiarev

Hi Robin,

I was not aware of that problem with compatibility between different arduino versions, thank you for point me that.
I tested AWind libraries on arduino-1.5.6-r2 release and I can compile them without any problem but only in Arduino IDE. Usually I compile all my projects in Visual Studio with Visual Micro add-on (see ABuild git-hub repository) and in the case of Arduino 1.5 version I get strange error: "core.a(new.cpp.o)*:In function `__cxa_pure_virtual'". By the way I forgot to mentioned that I had to change the RF24_config.h in  RF24 library because of new Aduino version (see installation instructions for ASensor library)

Regards

Andrei
AWind: GUI library for Arduino - TFT Displays
https://github.com/AndreiDegtiarev/AWind

Lumox100

Hi Andrei

I found your AWind library when looking for a "mobile keyboard" for a Arduino 3.2" TFT touch screen. Since your library only has a "keypad", I have extended your library with a mobile keyboard based on your keypad, which I will use in a Arduino Mega 2560 program.

I like your implementation of a windows manager and would like to use it, but I am having difficulty on figuring out how to use it exactly. Is there any detailed documentation for your AWind library on how to implement multiple windows?

I have a main window that displays 3 buttons. When I click on one of the buttons, I want it to open another full screen window that contains information. This information can then be edited using the mobile keyboard I created.
My problem is, I can't get the information window to display. Must the information window be implemented as a dialog or is it another window that is opened somehow over the main window using the windows manager?

In total, I will have about 7 windows that need to be displayed, which will be opened by clicking one of the 3 buttons on the main window.

Can you please advise on how to do this or provide some detailed documentation or examples. The examples you have only have one window containing buttons, text, charts, gauges etc.

-------
In a separate issue, I tried to open either your keypad window or my mobile keyboard window depending on what button I clicked. But it always only opened the same keyboard window, depending on which keyboard window was first registered in the MainWindow constructor. I thought there might be a problem on how the window manager finds the window in the "FindDialog" function, but no matter what I tried, I couldn't get both keyboard windows to open.

Code: [Select]

MainWindow(int width,int height):Window(F("Main"),0,0,width,height), _keyboardWindow(3,100), _mobKBWindow(2,100)
{
_keyboardWindow.RegisterEndDialogEventReceiver(this);
_modalWindow=NULL;
RegisterDialog(F("Keyboard"),&_keyboardWindow);


_mobKBWindow.RegisterEndDialogEventReceiver(this);
_modalWindow=NULL;
RegisterDialog(F("MobileKybrd"),&_mobKBWindow);

}


Regards
Lumox

AndreiDegtiarev

Hi Lumox,

thank you for interesting in AWind library!

There is doxygen documentation: http://andreidegtiarev.github.io/AWind. It is not completed yet, but for the start it's better as nothing. I am going to work on documentation further. Concerning your other questions: let's make it step by step: if I understood right your are asking for kind of window selector functionality.   As selector for windows you can take a look at example "Window Selector" I created in AWind library. This example demonstrated how visibility of windows can be controlled via buttons.  Is this solution you are looking for or you need something different?
About separate issue I need more explanation to understand what the functionality you are asking for, but let us speak about that, after we clarify "first issue".

Regards,

Andrei
AWind: GUI library for Arduino - TFT Displays
https://github.com/AndreiDegtiarev/AWind

Lumox100

Thanks for the reply Andrei. I tried your WindowsSelector example and understand how it works. But it's not exactly what I want.

I have a main window with three buttons. What I want is when I click button1, it opens a new window - w1- that completely covers the main window. Clicking a button on window1 will then open a new window - w2- that will completely cover w1. On both w1 and w2, there will be a back button that when clicked, will close/hide that window and the previous window will be shown.

Click back button on window2, window1 shown. Click back button on window1, main window shown.

I don't want w1 being a window shown in the main window.

I have tried making w1 and w2 children of the main window, then hiding the main window when w1 is shown, but then I lose the touch ability on w1. If I don't hide the main window, then w1 and the main window are drawn over each other.

Any ideas?

AndreiDegtiarev

I see now what do you want, Lumox.
I found a bug in AWind find  dialog function. The strcmp_P function didn't work as expected for PROGMEM strings - I write my own. You need update AFrame and AWind libraries. There is one limitation still: only one nesting of dialogs is implemented at this moments. It means you can call dialog from window, but not dialog from dialog. I will try remove this limitation. If I don't managed to do that in case of your special application I can imagine another solution, but as more general approach I would prefer dialogs. I'll get back with solution.

Regards,

Andrei
AWind: GUI library for Arduino - TFT Displays
https://github.com/AndreiDegtiarev/AWind

Lumox100

The FindDialog function is now working correctly. Thanks. Here are some of the images of the mobile keyboard I made. I need to refine it a bit and add some other features, but it does work.

Capital letters:


Small letters:


Numbers and symbols:


Your keypad:

AndreiDegtiarev

Lumox, nice pictures! They have inspirited me to complete dialog  windows functionality (see dialogs example).  If you want, your keyboards can be included into AWind library.

Additionally, new default decorators are introduced so that it is less code necessary to build GUI.
Minor incompatibilities to application based on AWind library previous version are expected. If someone have any difficulties just ask.
AWind: GUI library for Arduino - TFT Displays
https://github.com/AndreiDegtiarev/AWind

AndreiDegtiarev

Keybords from Lumox are transferred to AWind library (see AWind_04_MobileKB example).
Thank you Lumox for this extension!

DUE is "officially" supported now (I bought recently one) and some adjustments in AWind library were made

Experience with DUE: It was not easy to make Sainsmart Due +shild +  3.2 display working. Although everything were received in one package, it was necessary to change power jumper from 5V to 3.3V (because of DUE) + "#define CTE_DUE_SHIELD 1" in UTFT-Library had to be uncommented.
AWind: GUI library for Arduino - TFT Displays
https://github.com/AndreiDegtiarev/AWind

AndreiDegtiarev

Installation procedure is simplified and now it makes use of github release functionality (see initial post).

Screenshot and small description for Dialog example is added (see also initial post)
AWind: GUI library for Arduino - TFT Displays
https://github.com/AndreiDegtiarev/AWind

AndreiDegtiarev

New AWind Version is released

Migration to Arduino 1.6.6. Previos arduino should work as well, if not let me know.
3D Buttons with gradient fill.

Known issues: For "Mega" board the library is compiled without problems. In case of "Due" there are compiler errors about not known 'max' function. It seems to be a bug in the current Arduino release. In the 1.6.7 (at this moment exists in form of night builds) compiler runs without any problems. In the Version 1.6.6 you need just replace 'max' with 'Max'.
AWind: GUI library for Arduino - TFT Displays
https://github.com/AndreiDegtiarev/AWind

Re-Specto

Hello Andrei!
thank you for your great work

is it possible to port your library to STM32F103 (for project stm32duino.com)?
this is a very popular and cheap ARM Cortex-M3 MCU and it works great with the Arduino IDE
however, your code cannot compile for it

AndreiDegtiarev

Hi Re-Specto,

thank you for interesting in AWind library.

Before I can help you I need more information about problems with compiler.
The important prerequisite for AWind library is running UTFT library. Did you managed to run examples from this library? If I "understood Google" right, the official UTFT library doesn't support STM32F103  and there are some special versions. Do you use one of such version? What kind of errors you get from compiler?

Regards,

Andrei
AWind: GUI library for Arduino - TFT Displays
https://github.com/AndreiDegtiarev/AWind

est_cap

Hi everyone!

First of all, AndreiDegtiarev, thanks for sharing this library with us. I have been looking at its features and it is simply GREAT.

I was not able to test it yet, tho. I have a Mega2560 and a DUE, and I am having problems trying to connect my TFT/SD Shield. My shield works with the Adafruit TFT library, connecting it to my MEGA2560 as if it was a UNO shield, and it is detected as having the ILI9325 chipset (There is a function in Adafruit's library that gets you the chip's ID, which in this case detects as having  the identifier  0x9325 )

Looking through the libraries documentation (both UTFT and AWinds) I tried to fiddle with pinout with no success. I even tried using the HW_AVR_defines.h comment to use the shield with no success.


My shield is the following:




Any idea of what I might be missing? Any input will be appreciated. Thanks and again, great job with this library AndreiDegtiarev .

AndreiDegtiarev

Hi Est_cap,

thank you for the kind words about AWind library.

Good news that your hardware is working with Adafruit TFT library. Did you managed to get your system working with UTFT library? Actually in the AWind library you will not find any information about pinout, because AWind rely completely on UTFT library - AWind is built just on top of UTFT library.
If you still keep trying, then I would stack with Mega, Due in my opinion is more exotic system. By the way I don't see pictures from your board.

Regards
Andrei
AWind: GUI library for Arduino - TFT Displays
https://github.com/AndreiDegtiarev/AWind

AndreiDegtiarev

AWind new release. Following features are implemented:

  • Tab control: example TabControl (basic), VacuumPump (advanced)
  • Timer: example VacuumPump
  • Portrait display alignment: example SmartDHT
  • Horizontal progress bar: see example VacuumPump
  • Active intercation with hardware (stepper, relay): example VacuumPump

Regards

Andrei

AWind: GUI library for Arduino - TFT Displays
https://github.com/AndreiDegtiarev/AWind

Go Up