Write your first ESP32 touchscreen app for L10 with AI
Sometimes a knock is the only way to find out whether a meeting is in progress. Give the room a sign. Tap as you enter and the display turns orange. Tap as you leave and it goes green. That one interaction takes you from a simple idea to a working interface and firmware you build yourself.
Try the sign →
Give the room your own name
Enter a room number or try STUDIO 02, LAB 7 or PODCAST. Tap the colored area in the middle. People outside the studio can see when to wait. Start with the name, then adapt the meeting message for recording sessions below.
Using the name from the build.
Your first line of interface code
caption(screen, "S T U D I O / 0 1", -175, 0xf5f1dc);
This line updates as you type. In the full example, find the line with the letters of STUDIO in create_sign and replace it with this one. The full listing uses the original room name from our build.
The preview follows the screen proportions. Compare the square and tall layouts. A simulated restart returns the room to available. Check the display and touch response on your own panel.
The example stores the state in memory, so it starts up green every time. For office use, consider showing “Check availability” after a restart or refreshing the status from a booking system.
Make it useful in your space
Start by changing two labels. Keep the tap behavior. For automatic updates, add a service connection and an offline indicator later.
Make a working copy you can start over from
Use LANBON L10 Hardware SDK 0.6.0-rc.1, ESP-IDF 5.5.4 and the included LVGL settings. Choose the LANBON Wi-Fi L10-HS or L10-HSU. You can compile on your computer with the panel disconnected. Read the guide, sign in and accept the terms to obtain the SDK. Keep the original archive and edit a separate copy.
Square screen guide ↗ Tall screen guide ↗ Compare the models →Flashing replaces the current program. Follow the guide to make and verify a full local backup first. Stop if verification fails. Keep it private for your own use on the same unit. Never upload it to AI services or share it publicly. LANBON does not offer factory application downloads. Even a same-unit restore can fail.
Ready to try it on an L10?
Check your model on the hardware development page. The guides are public. To get the SDK, register or sign in, read the terms and accept them.
Explore LANBON hardware development ↗ Read the official L10 development guide ↗Tell the AI what to build and how you will test it
Codex helped us write this example. The prompt below reflects the implementation. Build it once with the default name before customizing it.
Share only your own requirements and interface descriptions you have permission to disclose. Read AI_START_HERE.md locally in the SDK. Keep private packages, factory software, account information and device backups away from external services.
What happens when you tap?
Press and release. LVGL sends a click event. The toggle function changes busy and paint updates the color, status and next action. A second tap takes the same path back to available. Follow those steps in the code as you try the preview.
| Common mistake | How the example handles it |
|---|---|
| Reusing fixed vertical positions on the taller screen | LVGL centers the button. The two captions sit 175 pixels above and below the center. |
| Repeated toggles while holding a finger down | The callback listens only for LV_EVENT_CLICKED. It flips busy once and paint updates all three cues together. Try a long press on the panel. |
| Expecting the sign to control room equipment automatically | The example initializes the panel, draws the interface and sets the backlight. It sends no network, sensor automation or base output commands. |
Copy the complete example below into main/developer_demo.c in your working copy. Keep the rest of the project and build settings intact. The example uses the included English font. For other scripts, supply a font with the characters you need.
Show example code · main/developer_demo.c
/* Room sign example for the LANBON L10 hardware SDK 0.5.0.
* Replace main/developer_demo.c in a working copy. Display and touch only.
*/
#include "l10_sdk.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
static bool busy;
static lv_obj_t *tile;
static lv_obj_t *status;
static lv_obj_t *action;
static void paint(void)
{
lv_color_t color = lv_color_hex(busy ? 0xffbf80 : 0x9ee7bb);
lv_obj_set_style_bg_color(tile, color, 0);
lv_label_set_text(status, busy ? "IN A MEETING" : "AVAILABLE");
lv_label_set_text(action, busy ? "Tap to finish" : "Tap to start");
}
static void toggle(lv_event_t *event)
{
(void)event;
busy = !busy;
paint();
}
static lv_obj_t *caption(lv_obj_t *parent, const char *text, int y, unsigned color)
{
lv_obj_t *label = lv_label_create(parent);
lv_label_set_text(label, text);
lv_obj_set_style_text_color(label, lv_color_hex(color), 0);
lv_obj_align(label, LV_ALIGN_CENTER, 0, y);
return label;
}
static void create_sign(void)
{
lv_obj_t *screen = lv_scr_act();
lv_obj_clear_flag(screen, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_set_style_bg_color(screen, lv_color_hex(0x112426), 0);
caption(screen, "S T U D I O / 0 1", -175, 0xf5f1dc);
tile = lv_btn_create(screen);
lv_obj_set_size(tile, 352, 256);
lv_obj_center(tile);
lv_obj_set_style_radius(tile, 28, 0);
lv_obj_set_style_shadow_width(tile, 0, 0);
lv_obj_add_event_cb(tile, toggle, LV_EVENT_CLICKED, NULL);
status = caption(tile, "", -18, 0x112426);
action = caption(tile, "", 18, 0x112426);
caption(screen, "Manual room status", 175, 0xc4d5cd);
paint();
}
static void start_sign(void *unused)
{
(void)unused;
ESP_ERROR_CHECK(l10_init());
ESP_ERROR_CHECK(l10_ui_lock(-1) ? ESP_OK : ESP_ERR_TIMEOUT);
create_sign();
l10_ui_unlock();
ESP_ERROR_CHECK(l10_backlight_set(60));
vTaskDelete(NULL);
}
void app_main(void)
{
BaseType_t started = xTaskCreatePinnedToCore(start_sign, "room", 32768,
NULL, 5, NULL, 0);
ESP_ERROR_CHECK(started == pdPASS ? ESP_OK : ESP_ERR_NO_MEM);
}
Build custom ESP32 firmware for your L10
Run just the commands for your board. Check that each step succeeds before continuing. The plan command checks local files with the panel untouched.
# Open your SDK working copy in ESP-IDF 5.5.4 PowerShell # Install tool dependencies if needed python -m pip install -r tools/requirements.txt # L10-HS .\tools\build.ps1 -Board eu python tools/l10_device.py plan --model L10-HS # L10-HSU .\tools\build.ps1 -Board us python tools/l10_device.py plan --model L10-HSU
We built both sizes on Windows and checked each manifest, file length and SHA-256 in firmware/eu and firmware/us. The table records our application files. Code or build environment changes can alter the digest. Compare your files against your own new manifest.
| Model | Pixels | App size | Digest prefix | Files checked |
|---|---|---|---|---|
| L10-HS | 480 × 480 | 492592 bytes | d156dea19ddf1748… | 4 of 4 passed |
| L10-HSU | 480 × 854 | 490544 bytes | 9a2ef5708e1e7a9c… | 4 of 4 passed |
Original build log from 0.5.0.
See both build logs and the source digest
Exported L10-HS: 4 images, version 0.5.0-dev.2, see VALIDATION.json Exported L10-HSU: 4 images, version 0.5.0-dev.2, see VALIDATION.json 7ac958d3f44671744054def4a2ab0fb2c60c7696b38016e3536b154d91f6ea17
Test on your own panel
We ran this build on an L10-HS square panel and confirmed that the sign displayed correctly and a tap switched between available and in a meeting. The L10-HSU tall build passed compilation and file checks. Hardware testing for that model is pending. The interactive preview above is a simulation. Try these checks on your panel.
Disconnect mains and loads first. Use the isolated low-voltage setup in the official guide. Confirm the model and verified full backup for this exact unit. Follow the matching guide. Stop if you are unsure of the model or recovery conditions.
Official backup, run and restore guide ↗| Action | Expected result |
|---|---|
| Start up | Green, available. The room name, button and bottom note are fully visible. |
| Tap once, then again | Orange during the meeting, then green again. The prompt changes with the color. |
| Press and release slowly, then tap near the edges | One change per complete tap. Note missed or double responses. |
| Restart | Available again. Check readability from a distance and note any text that needs enlarging. |
If the build fails, find the first error and check the toolchain version and original settings. Avoid leftover images from older builds. If the previous demo appears, check the file you replaced, the build directory and the new manifest. If proportions or touch positions look wrong, pause flashing, check HS versus HSU and consult the guide with your observations.
Would someone else know what to do?
Stand at the distance people will actually read the sign. Ask someone new whether they can go in, then ask them to end the meeting. If you have to explain a color or point to the button, turn that feedback into your next request. Try “Keep the tap behavior, enlarge the status text and check which fonts are available.”
Frequently asked questions
Do I need an account to try the preview?
Read this tutorial, try the simulation and copy the room sign code freely. To build it, register or sign in and accept the terms to download the official SDK.
Could I turn this into a home dashboard?
Reuse the interface idea and add your own data connection, status updates and handling for lost connections.Design a home dashboard →
Wi-Fi developer guide
The tested 0.5.0 square-panel sign switches locally by touch. As an extension, publish availability to a calendar service and show “Synced” after acknowledgement. Keep setup accessible when adding the sign as a view.
Your firmware can use built-in 2.4 GHz Wi-Fi. Choose a network and enter its password on the touchscreen or use a phone browser. Both methods work without installing an app.
