> For the complete documentation index, see [llms.txt](https://docs.aic-eec.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aic-eec.com/general/getting-start/lvgl-light-and-versatile-embedded-graphics-library/setting-program-for-lvgl-simulator.md).

# Setting program for LVGL Simulator

### [**ติดตั้ง  ubuntu 18.04** ](https://www.thaihowuse.com/%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5%E0%B8%95%E0%B8%B4%E0%B8%94%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87-ubuntu-%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%84%E0%B8%B9%E0%B9%88%E0%B8%81%E0%B8%B1%E0%B8%99%E0%B8%81%E0%B8%B1%E0%B8%9A-windows-10/)

### **ติดตั้ง vscode on Ubuntu**&#x20;

1. Download Visual Studio Code for Ubuntu <https://code.visualstudio.com/download>
2. &#x20;คลิ๊ก ไฟล์ที่ดาวน์โหลดมาแล้วกด Install

![](https://paper-attachments.dropbox.com/s_CBE441AFCBBC6BD47122868ACD39D61F6AE20934993FE4F541AD7A3C7A7F346E_1613543358648_image.png)

&#x20;    3\. เปิด terminal พิมพ์ คำสั่ง เพื่อเปิดโปรแกรม vscode&#x20;

```bash
$ code .
```

&#x20;  กด Ctrl+shift+x พิมพ์ c/c++ ในช่อง extensions แล้วกด Install

![](https://paper-attachments.dropbox.com/s_CBE441AFCBBC6BD47122868ACD39D61F6AE20934993FE4F541AD7A3C7A7F346E_1613543398587_image.png)

### **Install package SDL2**

```bash
$ sudo apt-get update && sudo apt-get install -y build-essential libsdl2-dev
```

### **Download LVGL library โดยใช้คำสั่ง git clone**&#x20;

```bash
$ git clone --recursive https://github.com/lvgl/lv_sim_vscode_sdl
```

ใช้คำสั่ง cd เข้าไปยังโฟลเดอร์ lvgl ที่ดาวน์โหลดมา

```bash
$ ls
$ cd lv_sim_vscode_sdl
```

![](https://paper-attachments.dropbox.com/s_ECCD5225C8E45672B6A991A36DA84EC88BB3C63633F01E6B47FACA506A564F4A_1613560579703_Screenshot+from+2021-02-17+18-15-41.png)

เปิดโปรแกรม vscode ด้วยคำสั่ง command line

```bash
code .
```

![โปรแกรม lvgl simulator บน vscode](https://paper-attachments.dropbox.com/s_ECCD5225C8E45672B6A991A36DA84EC88BB3C63633F01E6B47FACA506A564F4A_1613558217918_589482.png)

เมื่อหน้าต่างโปรแกรม lvgl simulator บน vscode ปรากฏ ให้กด F5 เพื่อ complie โปรแกรม simulater รอสักครู่ จะมีหน้า UI ของโปรแกรม lvgl simulator แสดงขึ้นมา

![หน้าต่างที่ปรากฏขึ้นหลังจากกด F5](/files/-MdzJ5OxOZDu6jb7iFD8)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.aic-eec.com/general/getting-start/lvgl-light-and-versatile-embedded-graphics-library/setting-program-for-lvgl-simulator.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
