acid-drop- Hacking the planet from a LilyGo T-Deck using custom firmware |
git clone git://git.acid.vegas/acid-drop.git |
Log | Files | Refs | Archive | README | LICENSE |
qrcode.md (1012B)
1 ```eval_rst 2 .. include:: /header.rst 3 :github_url: |github_link_base|/libs/qrcode.md 4 ``` 5 6 # QR code 7 8 QR code generation with LVGL. Uses [QR-Code-generator](https://github.com/nayuki/QR-Code-generator) by [nayuki](https://github.com/nayuki). 9 10 ## Get started 11 - Download or clone this repository 12 - [Download](https://github.com/lvgl/lv_lib_qrcode.git) from GitHub 13 - Clone: git clone https://github.com/lvgl/lv_lib_qrcode.git 14 - Include the library: `#include "lv_lib_qrcode/lv_qrcode.h"` 15 - Test with the following code: 16 ```c 17 const char * data = "Hello world"; 18 19 /*Create a 100x100 QR code*/ 20 lv_obj_t * qr = lv_qrcode_create(lv_scr_act(), 100, lv_color_hex3(0x33f), lv_color_hex3(0xeef)); 21 22 /*Set data*/ 23 lv_qrcode_update(qr, data, strlen(data)); 24 ``` 25 26 ## Notes 27 - QR codes with less data are smaller, but they scaled by an integer number to best fit to the given size. 28 29 30 ## Example 31 ```eval_rst 32 33 .. include:: ../../examples/libs/qrcode/index.rst 34 35 ``` 36 37 ## API 38 39 ```eval_rst 40 41 .. doxygenfile:: lv_qrcode.h 42 :project: lvgl