Welcome to the VMU Pro LUA SDK documentation. This SDK enables you to create applications for the VMU Pro platform using the LUA scripting language.
Getting Started
The VMU Pro LUA SDK provides a comprehensive set of APIs for developing applications:
- Logging - Application logging and debugging
- Display - Graphics rendering and display management
- Input - Button and control input handling
- Audio - Volume and brightness control
- File System - File and folder operations
- Utilities - Timing, memory, and helper functions
Application Structure
Every VMU Pro LUA application must have:
- app.lua - Main entry point with
app_main() function
- metadata.json - Application configuration and metadata
- icon.bmp - 76x76 pixel application icon
Example Application
function app_main()
-- Clear display and show text
vmupro_display_text(10, 10, "Hello World!", VMUPRO_COLOR_WHITE)
vmupro_display_show()
return 0 -- Success
end
file vmupro_display lua brief VMU Pro LUA SDK Display and Graphics Functions author version date copyright defaults to black usage vmupro_display_clear() -- Clear to black --- @usage vmupro_display_clear(0xFFFF) -- Clear to white --- @usage vmupro_display_clear(0xF800) -- Clear to red --- @note This is a stub definition for IDE support only. --- Actual implementation is provided by VMU Pro firmware at runtime. function vmupro_display_clear(color) end --- @brief Refresh the display to show all drawing operations --- @usage vmupro_display_refresh() -- Update the screen --- @note Call this after drawing operations to make them visible --- @note This is a stub definition for IDE support only. --- Actual implementation is provided by VMU Pro firmware at runtime. function vmupro_display_refresh() end --- @brief Draw a rectangle outline --- @param x number X coordinate of top-left corner --- @param y number Y coordinate of top-left corner --- @param width number Width of rectangle --- @param height number Height of rectangle --- @param color number RGB565 color value --- @usage vmupro_draw_rect(10
file vmupro_log lua brief VMU Pro LUA SDK Logging API author version date copyright VMUPRO_LOG_INFO
Definition vmupro_log.lua:13
Module System
The SDK supports standard LUA modules using require():
-- Load custom modules
local math_utils = require("libraries.math_utils")
local graphics = require("libraries.graphics_helpers")
-- Use module functions
local result = math_utils.clamp(value, 0, 100)
graphics.draw_button(x, y, width, height)
API Reference
Browse the API modules in the navigation menu to see detailed function documentation with parameters, return values, and usage examples.
Development Tools
- Packer Tool - Package your LUA application into .vmupack format
- Send Tool - Deploy applications to VMU Pro devices via USB/serial
For more information, see the README.md file in the SDK repository.