Go Down

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

AndreiDegtiarev

Jul 22, 2014, 03:29 pm Last Edit: Apr 14, 2018, 03:54 pm by AndreiDegtiarev
Introduction:
AWind - Arduino window library https://github.com/AndreiDegtiarev/AWind. Provides simple way of creating GUI for TFT-touch and OLED displays. Chart windows, labels, buttons, editable text boxes, tab controls help to develop complex user interface for Arduino applications

Features:
Consistent window layout handling: it is possible to create dynamic multi-window GUI
Events routing: framework forward events like touch action or sensor events to target window avoiding cumbersome construction with many "ifs"
Sensors: Sensors are treated as special type of events generator objects and they are integrated seamlessly via slim wrappers into AWind framework
Hardware: UTFT and Adafruit GFX compatible displays. Arduiono Mega and DUE boards. ESPxx boards are comming soon

Examples:
TFT
Simple text: demonstrates how text can be edited by use of virtual keyboard
Gauges: demonstrates how to use gauge and button controls

Charts: simple chart is created and dynamically updated

Dialogs: demonstrates how handle nested dialogs in AWind library

Oscilloscope: more complex example where signal is measured on analog pin and plotted on chart window. The parameters of signal acquisition (sample ratio and length) and parameters of chart (Y-Axis scaling) can be adjusted at runtime.


Vacuum pump: This advance example demonstrates how to work with tab controls, timer, how interact with stepper motor, relay and etc.

SensorsMonitor: example is based on my own application to truck temperature, humidity and air pressure from different sources. Results of measurements can be presented in text or in chart from. Sensors in example are working in Demo mode so that real wiring isn't needed

OLED
OLED DHT: demonstrates how visualize DHT sensor data on OLED display

OLED Oscilloscope: demonstrates how visualize analog signal in form of chart

OLED Smart charger: smart charger for AA NiMH batteries



Installation
TFT via UTFT library
  UTFT: http://www.rinkydinkelectronics.com/library.php?id=51
  UTouch: http://www.rinkydinkelectronics.com/library.php?id=55
OLED via Adafruit-GFX-Library
  Adafruit-GFX-Library: https://github.com/adafruit/Adafruit-GFX-Library
  Adafruit driver for your display. In my case it is SSD1306 display.
AWind libraries
   AFrame, ASensor and AWind libraries can be installed from awind_full.zip: https://github.com/AndreiDegtiarev/AWind/releases
   You need uncompress the content of awind_full.zip into arduinosketchfolder/libraries/ folder.
Restart the IDE

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

robtillaart

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

AndreiDegtiarev


It sounds similar to my library, but you included charts, oscilloscopes and sensor monitors.

My library is here TFT_Extension

Here in Germany answer would sound like „Jein": mixutre from „Ja" and "Nein" :-)
I would say our libraries target different groups of applications. In your case it is more or less simple fancy GUIs that easy to use for beginners in c++. AWind library is more focused on events routing between different GUI-elements, GUI-elements updating depending on application needs (not each time complete display), handling of hidden/visible status and so on. This together results, of course, in longer learning curve, on the other hand allows more complex GUIs.
Just small point about oscilloscope and sensor monitor you mentioned: they are not core features but just examples how AWind library can be used
AWind: GUI library for Arduino - TFT Displays
https://github.com/AndreiDegtiarev/AWind

AndreiDegtiarev


some screen shots would be appreciated !

it was kind of challenge to link pictures hosted on github, but nevertheless somehow it works now with screenshots  8)
AWind: GUI library for Arduino - TFT Displays
https://github.com/AndreiDegtiarev/AWind

Randcook

Like, also where did you obtain the Bezel?
Cheers
Peter

AndreiDegtiarev


Like, also where did you obtain the Bezel?
Cheers
Peter

The bezel I found here http://www.exp-tech.de/Zubehoer/Gehaeuse/LCD-Bezel-3-2-Weiss.html
from 4DSystems http://www.4dsystems.com.au/product/Bezel

it is not 100 % fit to my display, but it is still better as nothing
AWind: GUI library for Arduino - TFT Displays
https://github.com/AndreiDegtiarev/AWind

AndreiDegtiarev

Examples were extended with gauges example (see first message in this topic)
AWind: GUI library for Arduino - TFT Displays
https://github.com/AndreiDegtiarev/AWind

AndreiDegtiarev

Nowadays everything is "flat" but nevertheless some 3D-ness is introduced (see example screenshots)
AWind: GUI library for Arduino - TFT Displays
https://github.com/AndreiDegtiarev/AWind

Brent

Hi Andrei,

This is a really well written set of libraries - great job!  I have a small sensor network set up using RF24 modules that send the data to a 'base station'.  I am wondering if you have any examples on how to use the NRF24Transceiver sensor?

Robin2

I never noticed this Thread until now.

I didn't know you do that stuff with a Mega.
I'm tempted to buy one of those screens just so I can play with it.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

eychei

Hello AndreiDegtiarev,

thank you for your AWind Library. Im Trying to get your example to Work but cant:(

Hoepfully someone can help me.

I have a Due and 3.2 TFT as ITDB32S, the Utouch and UTFT examples all work great.


I get the following error when compiling your example "TEXT"



Arduino: 1.6.0 (Windows 8), Platine: "Arduino Due (Programming Port)"

In file included from C:\Arduino\libraries\AWind/Window.h:27:0,

                 from C:\Arduino\libraries\AWind/WindowsManager.h:23,

                 from Text.pde:24:

C:\Arduino\libraries\AWind/DC.h: In member function 'void DC::DrawNumber(float, int, int, int)':

C:\Arduino\libraries\AWind/DC.h:130:31: error: 'dtostrf' was not declared in this scope

   dtostrf(number,0,dec,_buffer);

                               ^

In file included from C:\Arduino\libraries\AWind/WindowsManager.h:24:0,

                 from Text.pde:24:

C:\Arduino\libraries\AWind/KeyboardWindow.h: In member function 'void KeyboardWindow::Initialize(float, int)':

C:\Arduino\libraries\AWind/KeyboardWindow.h:76:40: error: 'dtostrf' was not declared in this scope

   dtostrf(value,0,precision,_editBuffer);

                                        ^


Hopefully someone can help.



Thanks,

eychei

cbrandin

In order to be able to use this library with the Arduino Due I had to do two things:

Replace instances of "HardwareSerial.h" with "Arduino.h" (e.g. in "log.h" under AFrame)

The Arduino Due does not have a dtostrf() function so I  had to add this:

   char *dtostrf(double val, signed char width, unsigned char prec, char *sout) {
      char fmt[20];
      sprintf(fmt, "%%%d.%df", width, prec);
      sprintf(sout, fmt, val);
      return sout;
   }

to the files that require it (compile errors will tell you which ones - one is KeyboardWindow.h and another is DC.h (both in Awind) - there may be more, I haven't tried every demo yet.

Hope this helps!

Chris

q2dg

You could ask for include these libraries inside official IDE's "Library Manager" (you should create an issue in Arduino's github asking for it)

AndreiDegtiarev

For my new project I needed to add dust and air quality sensors (ASensor library is updated). I have used this opportunity to  update all AWinds libraries to the new Arduino IDE version (arduino-1.6.5-r5). Actually everything works good except small changes.
@eychei and cbrandin: I don't have Arduino Duo, but I have managed to compiled my examples with new UTFT library without any error messages.

Regards

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

Robin2

I have used this opportunity to  update all AWinds libraries to the new Arduino IDE version (arduino-1.6.5-r5).
Do you know if your latest version will work with the older versions of the IDE?

Unfortunately the Arduino folks don't seem to bother with backwards compatibility and there are quite a few Threads on the Forum where people have problems using well established libraries with the newer IDE.

I have not found any reason to progress past 1.5.6

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up