-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert lvgl and lv_examples to Arduino libraries #1609
Comments
Lets to be straight - this approach require (for Arduino IDE user) to install two libraries: 1. lvgl "core" repo and 2. lv_examples repo. Actually I'm trying to tell Arduino IDE, that the lv_examples repository will be dependent on lvgl core so (maybe) the library manager will install lvgl core automatically. |
True. I need to mention that right now there is no simple way for Arduino IDE users to use the
I have no experience with it but if it works, why not?
|
Typically with Arduino libraries,, the "library-master" contains ALL of the files and information pertaining to whatever it is you are providing, including the copyright notice, readme, library, support files, and examples. This is always updated as a package together (not in pieces) so that nothing ever gets out of sync. A good example of something that is a bit non-standard, yet acceptable, is Bodmer's "TFT_eSPI". This has the library, examples, etc. but the library uses an external config file (user_setup.h) that the user has to configure for their display type. That user_setup.h file is located within the library's folder (which itself is located in the /libraries folder). It would be better if this file was inside of the Arduino app (the one you are writing) folder, because every time there is an update to the TFT_eSPI library you have to go back and re-work that user_setup.h file because it is over-written as part of the update. Hopefully with lvgl you can point any config files to app's folder instead of the library's folder, but if not then we are already dealing with that now and it's not too big of a deal. This is the biggest downfall and confusion for everyone trying to use TFT_eSPI though, so some forethought on this might go a long ways to help eliminate technical support for LVGL. :) I should point out that at this point I would say that 99%+ of the people working with LCD/TFT displays are using the TFT_eSPI library because it's by far the fastest and most versatile way to use a ESP8266 and ESP32 with a display. It supports DMA, touch, etc. all built into a very simple structure. Your existing examples that do work use it, and I highly recommend for your own sake to stick with that for future examples, but don't be surprised if you get some flak from the Adafruit crowd for not having an example using their library. :) |
Thanks for sharing your though @JimDrewGH ! We can add a dependency to
Maybe it'd be better to the
Adafruit already adopted LVGL, so I hope they will write :) |
I've added the discussed files to lvgl and lv_examples. Could you take a look before publishing them? I added a modified TFT_eSPI example, but in lack of hardware I couldn't test it. Can you check if it works? |
Yes, I'll give it a shot and let you know... |
Are these suppose to work with LVGL for Arduino? |
No, this is replacement for |
@Pablo2048 |
I don't think so - I thought that |
Ah, ok. I will wait for the examples to be ported to the Arduino. |
This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@jc78 has tested the Arduino libs (both lvgl an lv_examples) and reported that they working. So we can switch in the registry to the new lib. @Pablo2048 as you have experience with this can you write to Arduino about it? |
Finally, I asked Arduino to add the libraries and it's done. Thank you for your contribution! |
Unfortunately, this did not help Arduino IDE users. When adding the example library to the Arduino IDE system (either manually using the add library function) or through the library updater, the example files are no where to be found. They are present in the "libraries" folder, but you can't load any of the examples as a normal project because they are not shown. |
Sorry guys, I'm dead man at least until the end of the next month because of my main work :-( ... |
You can (I hope it works) Is it working? |
No worries, hang in there! 🙂 |
No, that doesn't work. With the Arduino IDE, you need each of the examples in its own dedicated folder or it can't be used. The examples can not be libraries, they are stand alone programs that can use an existing library. |
The only way I can see for the Arduino IDE is to convert lv_examples to "dummy" Arduino library just with the |
It compiles for me #include <lvgl.h>
#include <lv_examples.h>
void setup() {
// put your setup code here, to run once:
lv_init();
lv_ex_btn_1();
}
void loop() {
// put your main code here, to run repeatedly:
} Is there any problem with that? |
Thanks Pablo, I got it now. It's really not working but I don't think it makes a big difference and reasonable:
IMO once we create the Arduino site in the docs and clarify this, it will be still easy to use for the users. |
Pablo is correct. Right now, nobody using the Arduino IDE can use any of your examples (except the 3 examples from LVGL v6, which are text print and a slider - not very helpful). If you can't open an example (which is just a project), then you can't use it with the IDE at all. I am not sure what happened because you do have 3 simple examples that work from v6, but nothing from v7 works. I am trying to get your benchmark to work under Arduino IDE and I have not been successful. Its missing dependencies and has incorrect syntax. I would like to get ALL of the examples that your non-Arduino version has - like the printer interface. The benchmark and other examples (even from v6) are certainly way more than 1 line of code! Does nobody working on the LVGL project actually use the Arduino IDE? You do realize that is what the vast majority of people are using? |
What error did you get when called |
@kisvegabor Hi, when I try to compile
|
Hi @Pablo2048, I enabled all fonts which are mentioned in error, but error still persist. I guess, but can not find where, it is missing some link to that definition in that |
@dronecz Please check that you are editing the correct |
Hi @embeddedt , yes I´m editing right config 😉 . I can compile and upload widget example without problem 🙂 . |
How are loading the code into the IDE? I don't see a way to do that still... other than the 3 examples from v6, there is no code available for v7. |
@JimDrewGH |
Hi,
We already discussed the topic of converting these repos to ESP components (cc @C47D and).
The same idea was discussed with @Pablo2048 as well for Arduino libraries.
I've tested what are the required steps to make lvgl and lv_examples compatible with Ardunio:
#include "../lvgl.h"
What do you think?
The text was updated successfully, but these errors were encountered: