Getting Started with Lopaka: Build Your First Arduino GUI in 10 Minutes
Published on Lopaka.app — The free web-based LVGL GUI builder for embedded developers
Introduction
If you've ever tried to build a graphical user interface for an Arduino TFT display, you know the pain: positioning every pixel by hand, guessing coordinates, flashing to hardware, seeing it's wrong, adjusting, re-flashing, and repeating the cycle until you want to throw your breadboard across the room.
There's a better way.
In this tutorial, you'll build your first Arduino GUI in under 10 minutes using Lopaka — a free, web-based tool that lets you design LVGL interfaces with drag-and-drop, then exports clean C code ready for your Arduino project.
No downloads. No installs. No environment setup. Just open your browser and start building.
What You'll Build
A simple but functional sensor display that shows:
- Temperature reading with a large numeric display
- Status indicator (OK / Warning / Error)
- A button to toggle between Celsius and Fahrenheit
- A progress bar showing battery level
This is the kind of interface you'd find on a handheld sensor device, weather station, or battery monitor.
Prerequisites
- A web browser (Chrome, Firefox, Safari, or Edge)
- An Arduino board with a TFT display (we'll use Arduino Uno + ILI9341 2.8" as an example)
- Basic familiarity with Arduino IDE
- That's it.
Step 1: Create Your Project
- Open lopaka.app in your browser
- Click "New Project"
- Select your platform: Arduino
- Choose your display: ILI9341 (320x240)
- Give your project a name: "Sensor Display"
- Click "Create"
You'll see a blank canvas with a widget panel on the left and a properties panel on the right. If it's your first time, the onboarding tour will guide you through the interface — take 60 seconds to follow along, or skip if you prefer to explore on your own.
Step 2: Add a Title Label
- From the widget panel, drag a Label onto the canvas
- Position it near the top center
- In the properties panel:
- Text:
Sensor Monitor - Font:
LV_FONT_DEFAULT_24(or the largest available) - Alignment: Center
- Color: White (or your preferred text color)
- Text:
You should see a large title at the top of your display preview.
Step 3: Add the Temperature Display
- Drag another Label onto the canvas
- Position it in the upper-middle area
- Properties:
- Text:
25.6°C - Font:
LV_FONT_DEFAULT_36(extra large) - Alignment: Center
- Color: Bright green or cyan (something that stands out)
- Text:
This will be your main sensor reading. In production code, you'll update this value from your actual sensor.
Step 4: Add a Status Indicator
- Drag a Label below the temperature
- Properties:
- Text:
STATUS: OK - Font:
LV_FONT_DEFAULT_16 - Color: Green
- Text:
For a more visual indicator, you can also add a LED widget (if available in your LVGL version) next to the status text.
Step 5: Add the Unit Toggle Button
- Drag a Button onto the canvas
- Position it below the status indicator
- Properties:
- Button text:
Switch to °F - Width: 160px
- Height: 40px
- Style: Rounded corners, contrasting color
- Button text:
This button will let users toggle between temperature units. In your Arduino code, you'll wire up the button's event handler to convert and display the value.
Step 6: Add a Battery Progress Bar
- Drag a Bar (progress bar) widget onto the canvas
- Position it near the bottom
- Properties:
- Width: 280px
- Height: 20px
- Value: 75 (out of 100)
- Color: Green (or yellow/orange for lower values)
- Add a small Label above it:
Battery: 75%
Step 7: Style and Polish
Now make it look professional:
- Background: Set the screen background to a dark color (dark gray or navy) for better contrast
- Spacing: Ensure consistent margins between elements (10-15px gaps)
- Alignment: Center-align all text elements
- Colors: Use a consistent color scheme — green for OK status, red for warnings, white for labels
Your interface should look something like this:
┌─────────────────────────────┐
│ │
│ Sensor Monitor │
│ │
│ 25.6°C │
│ │
│ STATUS: OK │
│ │
│ [ Switch to °F ] │
│ │
│ Battery: 75% │
│ ██████████████░░░░ │
│ │
└─────────────────────────────┘Step 8: Export the Code
- Click the "Export" button in the top toolbar
- Select Arduino as your target platform
- Choose your output format (single
.cfile or full project) - Click "Download"
You'll get clean, readable LVGL C code that you can drop directly into your Arduino sketch.
Step 9: Integrate with Your Arduino Code
Here's how to use the exported code:
#include <TFT_eSPI.h>
#include <lvgl.h>
#include "ui_SensorDisplay.h" // Your exported file
TFT_eSPI tft = TFT_eSPI();
void setup() {
// Initialize display
tft.begin();
tft.setRotation(1);
// Initialize LVGL
lv_init();
lv_tft_init();
// Create the UI from Lopaka
ui_SensorDisplay_init();
// Initialize your sensor
dht.begin();
}
void loop() {
// Read sensor
float temp = dht.readTemperature();
// Update the label (use the variable name from exported code)
lv_label_set_text_fmt(ui_TempLabel, "%.1f°C", temp);
// Update battery bar (example value)
lv_bar_set_value(ui_BatteryBar, 75, LV_ANIM_ON);
// Handle button events (auto-wired from Lopaka)
lv_timer_handler();
delay(5);
}Step 10: Test on Hardware
- Upload the sketch to your Arduino
- Verify the display shows your interface correctly
- Test the button interaction
- Confirm sensor readings update in real-time
What's Next?
You've built your first GUI in under 10 minutes. Now try:
- Adding more screens: Create a settings page or historical data view
- Custom widgets: Add gauges, charts, or custom-drawn elements
- Share your design: Use Lopaka's shareable links to show your work to others
- Explore advanced features: Animations, styles, and event callbacks
Why Lopaka?
- No setup: Runs entirely in your browser — no downloads, no installs
- Visual design: See your UI as you build it, no guessing coordinates
- Clean code export: Production-ready LVGL C code, not a black-box runtime
- Shareable: Send your designs to teammates or the community with a link
- Free to start: No credit card required
Resources
- Lopaka.app — Start building now
- LVGL Documentation — Learn more about LVGL widgets
- Arduino TFT Libraries — Display driver setup
- Lopaka Discord — Join the community
Have questions? Drop them in the comments below or join us on Discord. Happy building!