Utilizar littlevgl con Arduino

Using with Arduino

Post Reply 
RubenGrigoryan
Posts: 24
Joined: Tue Mar 12, 2019 2:06 am
  • Quote
  •  login to like this post
Post by RubenGrigoryan » Tue Mar 12, 2019 3:03 am
Hi
I'm trying to use your Arduino library as you described in read me file.
Unfortunately but Arduino is not recognizing littlevgl as library.
In my examples I can't see lvgl_test although that file exist in the Arduino library folder.
Also I 'm not sure how you operating with TFT display.
I mean as I know to be able use any type of screen I need provide connection pins which I can't see in lvgl_test.ino file.
For example I want to use ILI9433 TFT display with Adafruit ESP32 Feather board and my question is if it's possible to use your library with those devices?
Thanks.
Pablo2048
Posts: 21
Joined: Thu Feb 28, 2019 11:48 am
Location: Brno, Czech Republic
Contact: 
  • Quote
  •  login to like this post
Post by Pablo2048 » Tue Mar 12, 2019 5:33 am
Hi,
to use LVGL as an Arduino IDE library you need to do some steps installing the library manually IMHO. Also you have to have your own TFT driver which is not part of the LVGL. If you can use PlatformIO, I can give you simple project template for the ESP32 and driver for ILI9341 as an example. Also I can put some effort later this week to modify Arduino example as an standard library if there is need for it...
User avatar
kisvegabor
Site Admin
Posts: 451
Joined: Mon Feb 18, 2019 2:25 pm
  • Quote
  •  login to like this post
Post by kisvegabor » Tue Mar 12, 2019 5:53 am
Hi,
Please send a screenshot to see in which folder you placed the littlevgl.
RubenGrigoryan
Posts: 24
Joined: Tue Mar 12, 2019 2:06 am
  • Quote
  •  login to like this post
Post by RubenGrigoryan » Tue Mar 12, 2019 6:03 am
Hello kisvegabor,
here is the folder you asking
Image
RubenGrigoryan
Posts: 24
Joined: Tue Mar 12, 2019 2:06 am
  • Quote
  •  login to like this post
Post by RubenGrigoryan » Tue Mar 12, 2019 6:07 am
Hello Pablo,
I'm using Arduino IDE with the following library https://github.com/Bodmer/TFT_eSPI
So I would like to use LittlevGL with that library.
Is it possible?
Pablo2048
Posts: 21
Joined: Thu Feb 28, 2019 11:48 am
Location: Brno, Czech Republic
Contact: 
  • Quote
  •  login to like this post
Post by Pablo2048 » Tue Mar 12, 2019 6:32 am
Hi Ruben,
definitely you can use TFT_eSPI - actually my first attempt with LVGL was with simple disp_flush() function written to use TFT_eSPI :-). Something like this:
CODE: SELECT ALL
void disp_flush(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t *color_p) {
  uint16_t c;
  tft.startWrite(); // Start new TFT transaction
  tft.setAddrWindow(x1, y1, (x2 - x1 + 1), (y2 - y1 + 1));
  for (int y = y1; y <= y2; y++) {
    for (int x = x1; x <= x2; x++) {
      c = color_p->full;
      tft.writeColor(c, 1);
      color_p++;
    }
  }
  tft.endWrite();
  lv_flush_ready();
}
I will try to made an attempt to write Library manager useable library this week. Ok?
RubenGrigoryan
Posts: 24
Joined: Tue Mar 12, 2019 2:06 am
  • Quote
  •  login to like this post
Post by RubenGrigoryan » Tue Mar 12, 2019 6:36 am
Thank you
User avatar
kisvegabor
Site Admin
Posts: 451
Joined: Mon Feb 18, 2019 2:25 pm
  • Quote
  •  login to like this post
Post by kisvegabor » Tue Mar 12, 2019 3:09 pm
You should copy this littelvgl folder into the libraries folder (not the whole repository).
Pablo2048
Posts: 21
Joined: Thu Feb 28, 2019 11:48 am
Location: Brno, Czech Republic
Contact: 
  • Quote
  •  login to like this post
Post by Pablo2048 » Tue Mar 12, 2019 3:34 pm
I'm working (slowly) on regular library format, which is installable via Library Manager or as a .ZIP library and in PIO too. This is much simpler method for most Arduinians IMHO...
User avatar
kisvegabor
Site Admin
Posts: 451
Joined: Mon Feb 18, 2019 2:25 pm
  • Quote
  •  login to like this post
Post by kisvegabor » Wed Mar 13, 2019 7:39 am
@Pablo2048
It would be awesome
@RubenGrigoryan
Here is the project structure which wokrs for me:
Image
I've just noticed that it's different in the repo in GitHub. I'll fix it soon. lvgl folder in src solder is not working. Put lvgl's content directly into src
User avatar
kisvegabor
Site Admin
Posts: 451
Joined: Mon Feb 18, 2019 2:25 pm
  • Quote
  •  login to like this post
Post by kisvegabor » Wed Mar 13, 2019 7:57 am
I've just updated the GitHub repo's directory sructure : https://github.com/littlevgl/arduino/tr ... /littlevgl
Pablo2048
Posts: 21
Joined: Thu Feb 28, 2019 11:48 am
Location: Brno, Czech Republic
Contact: 
  • Quote
  •  login to like this post
Post by Pablo2048 » Fri Mar 15, 2019 6:13 am
As I have promised earlier I made standard Arduino library for LVGL and simple example using TFT_eSPI library as an TFT driver. Release v1.0.0 can be downloaded from here https://github.com/littlevgl/lv_arduino/releases and can be installed as an .ZIP library in Arduino IDE. Anyone please check it and after this I start registering the library in Arduino Library manager.
RubenGrigoryan
Posts: 24
Joined: Tue Mar 12, 2019 2:06 am
  • Quote
  •  login to like this post
Post by RubenGrigoryan » Sat Mar 16, 2019 5:53 am
Hi All.
Thank you Very much for this new Library (lv_arduino-1.0.0) !!!!
The IDE recognizing it perfectly, and compiling without errors, but can you go one more step ?
Like other libraries, make Example, and if possible please, just like in the attached picture, Example,
It will make are live lot easier to use LittlevGL,
Thank you in Advance
Image
Pablo2048
Posts: 21
Joined: Thu Feb 28, 2019 11:48 am
Location: Brno, Czech Republic
Contact: 
  • Quote
  •  login to like this post
Post by Pablo2048 » Sat Mar 16, 2019 7:27 am
Hi Ruben,
thank you for your feedback. I can try to add more examples, but we need to solve a few things first so here is my road plan:
What do you think?
RubenGrigoryan
Posts: 24
Joined: Tue Mar 12, 2019 2:06 am
  • Quote
  •  login to like this post
Post by RubenGrigoryan » Sat Mar 16, 2019 9:58 pm
THANK YOU !!!!
Pablo2048
Thats a good idea, for final goal, but for now if possible, please
My dream is to use this on 320x240 or maybe 480x320 TFT screens, i would like to try just a the graphics on those screens
like (ILI9341/320x240 or ILI9488/ 480x320), so if you can, on next library update, I like to try some graphics, without Touch, for now.
Thank you again.
RubenGrigoryan
Posts: 24
Joined: Tue Mar 12, 2019 2:06 am
  • Quote
  •  login to like this post
Post by RubenGrigoryan » Sun Mar 17, 2019 2:03 am
I'm sorry for too many posts, just want to try to explain exactly what I mean.
I want to see, if possible to display same resolution buttons, sliders and other stuff, like in the Browser demos, with ESP32 / ILI9341 with LittlevGL .
Pablo2048
Posts: 21
Joined: Thu Feb 28, 2019 11:48 am
Location: Brno, Czech Republic
Contact: 
  • Quote
  •  login to like this post
Post by Pablo2048 » Sun Mar 17, 2019 8:01 pm
Well if you want just to see the example, you can simply do it by yourself - just comment out original label creation in the demo and call function from the demo which builds the GUI. It's not so complicated IMO...
RubenGrigoryan
Posts: 24
Joined: Tue Mar 12, 2019 2:06 am
  • Quote
  •  login to like this post
Post by RubenGrigoryan » Sun Mar 17, 2019 11:38 pm
The graphics are Perfect !!!
It's better then on my iPhone :D :D :D
Thank you...
I'm having No luck displaying on ILI9488/480x320, I tried to change the resolution in lv_conf.h
/* Horizontal and vertical resolution of the library.*/
#define LV_HOR_RES (320)
#define LV_VER_RES (240)
The max resolution I'm getting
300x300, more then this, the screen goes WHITE,
please, let me know, if there is something I can change, to fix this?
RubenGrigoryan
Posts: 24
Joined: Tue Mar 12, 2019 2:06 am
  • Quote
  •  login to like this post
Post by RubenGrigoryan » Sun Mar 17, 2019 11:41 pm
My first Graphics test
Image
User avatar
embeddedt
Posts: 263
Joined: Wed Feb 27, 2019 4:37 pm
  • Quote
  •  login to like this post
Post by embeddedt » Mon Mar 18, 2019 12:11 am
@RubenGrigoryan It sounds like a problem with your display driver.
SHARE

Oscar perez

Arquitecto especialista en gestion de proyectos si necesitas desarrollar algun proyecto en Bogota contactame en el 3006825874 o visita mi pagina en www.arquitectobogota.tk

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comentarios:

Publicar un comentario