Coder Social home page Coder Social logo

esp32_ili9341's Introduction

LittlevGL project for ESP32

Example GUI with LittlevGL on ESP32

Get started

Install the ESP32 SDK

  1. Install ESP-IDF: http://esp-idf.readthedocs.io/en/latest/
  2. Get this projects: git clone --recurse-submodules https://github.com/littlevgl/esp32_ili9431.git

Add LittlevGL to the build

To link LittlevGL (lvgl) and lv_examples with ESP-IDF you need to add a component.mk file to each directory.

Next to this REAMDE file you find two component.mk files:

  • lvgl_component.mk
  • lv_example_component.mk

Rename lvgl_component.mk to component.mk and move it to the lvgl directory, then rename lv_example_component.mk to component.mk and move it to the lv_examples directory.

Flash to ESP32

  1. If you are not in the project's diectory: cd esp32_ili9431
  2. Build the project: make
  3. Upload the application to your board: make flash

Drivers

This project comes with an ILI9341 display driver and an XPT2046 resistive touchpad driver. Both devices are communicating via SPI.

ILI9341

The default pinout is:

Name Pin
MOSI 13
SCLK 14
CS 5
DC 19
BCKL 23
RST 18

You can modify the pin configuration in drv/disp_spi.h and drv/ili9341.h

For ILI9341 HSPI is used.

XPT2046

The default pinout is

Name Pin
MOSI 32
MISO 35
SCLK 26
CS 33
IRQ 25

You can modify the pin configuration in drv/tp_spi.h and drv/spt2046.h

For XPT2046 VSPI is used

ESP32 DevKit v1 with 30 GPIOS

There is another development kit with only 30 GPIOs available:

LittlevGL on ESP32 Kit with 30 GPIO

ILI9341

For ILI9341 HSPI is used, modify the pin configuration in drv/disp_spi.h to:

#define DISP_SPI_MOSI 13
#define DISP_SPI_CLK  14
#define DISP_SPI_CS   15

and drv/ili9341.h to:

#define ILI9341_DC   2
#define ILI9341_RST  4
#define ILI9341_BCKL 21

XPT2046

For XPT2046 VSPI is used, modify the pin configuration in drv/tp_spi.h to:

#define TP_SPI_MOSI 23
#define TP_SPI_MISO 19
#define TP_SPI_CLK  18
#define TP_SPI_CS   5

and drv/spt2046.h to:

#define XPT2046_IRQ 25

esp32_ili9341's People

Contributors

kisvegabor avatar c47d avatar frmdstryr avatar h3ndrik avatar agent3bood avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.