Giter VIP home page Giter VIP logo

lvgl's Introduction

Littlev Graphics Library

LittlevGL cover

LittlevGL provides everything you need to create a Graphical User Interface (GUI) on embedded systems with easy-to-use graphical elements, beautiful visual effects and low memory footprint.

Homepage: https://littlevgl.com

Table Of Content

Key features

  • Powerful building blocks: buttons, charts, lists, sliders, images, etc.
  • Advanced graphics with animations, anti-aliasing, opacity, smooth scrolling
  • Various input devices: touch pad, mouse, keyboard, encoder, buttons, etc.
  • Multi-language support with UTF-8 encoding
  • Fully customizable graphical elements
  • Hardware independent to use with any microcontroller or display
  • Scalable to operate with little memory (50 kB Flash, 10 kB RAM)
  • OS, External memory and GPU supported but not required
  • Single frame buffer operation even with advances graphical effects
  • Written in C for maximal compatibility
  • Simulator to develop on PC without embedded hardware
  • Tutorials, examples, themes for rapid development
  • Documentation and API references online

Porting

In the simplest case you need 5 things:

  1. Call lv_tick_inc(x) every x millisecods in a Timer or Task (x should be between 1 and 10)
  2. Register a function which can copy a pixel array to an area of the screen.
  3. Register a function which can read an input device. (E.g. touch pad)
  4. Copy lv_conf_templ.h as lv_conf.h and set at least LV_HOR_RES, LV_VER_RES and LV_COLOR_DEPTH.
  5. Call lv_task_handler() periodically every few milliseconds. For a detailed description visit https://littlevgl.com/porting Or check the Porting tutorial

Project set-up

  1. Clone or Download the lvgl repository: git clone https://github.com/littlevgl/lvgl.git
  2. Create project with your prefered IDE and add the lvgl folder
  3. Copy lvgl/lv_conf_templ.h as lv_conf.h next to the lvgl folder
  4. In the lv_conf.h delete the first #if 0 and its #endif. Leave the default configuration for the first try.
  5. In your main.c: #include "lvgl/lvgl.h"
  6. In your main function:
    • lvgl_init();
    • tick, display and input device initialization (see above)
  7. To test create a label: lv_obj_t * label = lv_label_create(lv_scr_act(), NULL);
  8. In the main while(1) call lv_task_handler(); and make a few milliseconds delay (e.g. my_delay_ms(5);)
  9. Compile the code and load it to your embedded hardware

PC Simulator

If you don't have an embedded hardware you can test the graphics library in a PC simulator. The simulator uses SDL2 library to emulate a display on your monitor and a touch pad with your mouse.

There is a pre-configured PC project for Eclipse CDT in this repository: https://github.com/littlevgl/pc_simulator

Related repositories

Screenshots

TFT material TFT zen TFT alien TFT night

Contributing

See CONTRIBUTING.md

Donate

If you are pleased with this graphics library, found it useful, or are happy with the support you got, please help its further development:

Donate

lvgl's People

Contributors

kisvegabor avatar zaltora avatar ajaybhargav avatar ino-josh avatar benqoo avatar pfalcon avatar chenshijianworkgit avatar upbeat27 avatar capnbry avatar koutheir avatar iromero91 avatar iamniels avatar scopa90 avatar

Watchers

James Cloos avatar AlexShi 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.