Merge pull request #892 from amirgon/patch-1
Add Micropython feature to README.md
This commit is contained in:
17
README.md
17
README.md
@@ -35,6 +35,7 @@ LittlevGL provides everything you need to create a Graphical User Interface (GUI
|
||||
* **OS, External memory and GPU** supported but not required
|
||||
* **Single frame buffer** operation even with advances graphical effects
|
||||
* **Written in C** for maximal compatibility
|
||||
* **Micropython Binding** exposes [LittlevGL API in Micropython](https://blog.littlevgl.com/2019-02-20/micropython-bindings)
|
||||
* **Simulator** to develop on PC without embedded hardware
|
||||
* **Tutorials, examples, themes** for rapid development
|
||||
* **Documentation** and API references online
|
||||
@@ -177,6 +178,22 @@ lv_btn_set_ink_out_time(btn, 300);
|
||||
|
||||

|
||||
|
||||
#### Use LittlevGL from Micropython
|
||||
```python
|
||||
|
||||
# Create a Button and a Label
|
||||
|
||||
scr = lv.obj()
|
||||
btn = lv.btn(scr)
|
||||
btn.align(lv.scr_act(), lv.ALIGN.CENTER, 0, 0)
|
||||
label = lv.label(btn)
|
||||
label.set_text("Button")
|
||||
|
||||
# Load the screen
|
||||
|
||||
lv.scr_load(scr)
|
||||
```
|
||||
|
||||
Check out the [Documentation](https://docs.littlevgl.com/) for more!
|
||||
|
||||
### Contributing
|
||||
|
||||
Reference in New Issue
Block a user