ESP32 Example Project

@kisvegabor, Do you have any improvement ideas for the example project of the ESP32?

Regards

Hi,

I have no specific improvement idea in my mind right now.

It’s not really an improvement for the ESP32 project but a WiFi connect demo would awesome!

In this issue we are talking about how to improve the LittlevGL examples. A WiFi connect demo app is on the road map. If you are interested in it let me know and we discuss the details. :slight_smile:

A Wi-Fi example would be awesome, it would also help me to understand other parts of the ESP IDF framework as I’m getting started with it. What functionality do you have in mind with this demo, i can work on it but because of my day job i can’t get it working in few days? :grinning:

There’s also support for Bluetooth and Bluetooth Low Energy on those ESP32 chips, maybe we can work on something using those peripherals also. The work we did on the ESP32_ILI9341 project was thinking about using that as a template for more projects.

An example project that I think would get many ESP32 users excited could be a simple (but beautiful) multi-page menu system…

  • Home page with clickable icons each taking you to a different example menu page:

    • Keyboard input example page
    • Text list example page
    • Button list example page
  • Timer so that menu pages auto-change every 5 seconds ensuring this demo is useful for a basic ESP32 with only a TFT attached.

  • Optional code to be uncommented to allow inputs. EG 4 buttons on 4 pins. (Left/Right/Select/Esc) or a Rotary encoder with click or a TFT touchscreen.

  • All input events (Clickable buttons/keyboard letter presses/menu selections) send a println of text to the Serial Monitor.

ESP32 users have a very powerful bit of hardware and lots have ended up using very plain LCD interfaces, I think LittleVGL will change a lot of people’s worlds!!! Great work!

I agree! Please post it to the related issue in lv_examples repo.

1 Like

For the WiFi demo I meant something simple like this:
Untitled%20Diagram

I can create the UI with an interface. For example:lv_wifi_set_ssid_list() and/or a callback to connect when the password is set. (It still needs to be designed and clarified.)
What do you think?

A Bluetooth demo would be great too. I suggest dealing with the WiFi first and we will see.

2 Likes

Hi,

Yes, it could be a good demo, the problem I see is that the ESP-WROVER-KIT doesn’t have touch controller, so I will need at least 4 buttons to navigate the keyboard. I can also prepare the code to take input from a touch controller for people having displays with that.

Okay, I’ll prepare it to work with keys too.

I was lready requesting/asking for a ESP32 example for a 5" display with the RA8875 :wink:
That would be a perfect example, having a 5" display with real menu e.g. multitab menu.
On small displays it is less effective bat on 5" with 800x480 resolution, that would be great.
WiFi and BLE is nice but there are plenty of ESP32 BLE and WiFi examples even with a couple of WiFi managers which provide a WiFI configuration page (provides an Access Point with a covinient Web configuration showing all scanned WiFi networks etc.)
I have a working RA8875 driver for ESP32 but don’t know how to integrate/connect it to littlevgl.

And of course with touch: All TFT are availble with touch screen, the ILI9341 (2,8" 320x240), ILI9488 (3,5" 480x32), RA8875 (800x480). Eith with resistive (ILIxxxx) and RA887 (resistiv or capacitve)
I have orderd it here (32US$)
https://www.buydisplay.com/default/5-inch-tft-lcd-module-800x480-display-controller-i2c-serial-spi

Maybe the display porting documentation would be useful.

@embeddedt I think the porting docu is the right info, but even with this, I still have not yet understood how to interface wih the RA8875 “display-buffer” (not sure if there is an API for that).
There are a few API’s for loading pictures to the display. I guess this are thes kind of API’s with DMA:

//-------------- DMA ------------------------------------------------------------------------------
void DMA_blockModeSize(int16_t BWR,int16_t BHR,int16_t SPWR);
void DMA_startAddress(unsigned long adrs);
void DMA_enable(void);
void drawFlashImage(int16_t x,int16_t y,int16_t w,int16_t h,uint8_t picnum);

and that is how a picture (e.g. from SD flash ) is written to the TFT using DMA.
Not sure if that is how littlevgl will interface with the TFT?

void RA8875::drawFlashImage(int16_t x,int16_t y,int16_t w,int16_t h,uint8_t picnum)
{
if (_portrait){swapvals(x,y); swapvals(w,h);}//0.69b21 -have to check this, not verified
if (_textMode) _setTextMode(false);//we are in text mode?
_writeRegister(RA8875_SFCLR,0x00);
_writeRegister(RA8875_SROC,0x87);
_writeRegister(RA8875_DMACR,0x02);
//setActiveWindow(0,_width-1,0,_height-1);
_checkLimits_helper(x,y);
_checkLimits_helper(w,h);
_portrait == true ? setXY(y,x) : setXY(x,y);

DMA_startAddress(261120 * (picnum-1));
DMA_blockModeSize(w,h,w);   
_writeRegister(RA8875_DMACR,0x03);
_waitBusy(0x01);

}

I’m working on a Settings demo right now. Here is the current state: https://github.com/littlevgl/lv_apps/blob/master/examples/lv_ex_settings/lv_ex_settings_2.gif
Did you mean something like this?

1 Like

demo looks nice, is this the standard/most efficient way of multi/pages (tab’s)?
I was also looking for an RA8875 example. I find a lot of ILI9341, or ILI9488 samples but no one with RA8875.
That is also a quite difficult open topic for me. THe porting part does not really solve my open questions how to connect the RA8875 (e.g. from sumotoy) with the few littlevgl driver API’s.

LittlevGL Temperature Monitoring

1 Like

Nice project, thanks for sharing. To make the project easier to find you can create a new post for it and add a few lines of description.

I have done quite a lot of work with BLE on the ESP, I’d be happy to look at doing an example where time permits.
What did you have in mind?

Awesome! Please open an issue in lv_apps repo and discuss it there.