Prompt
Design ESP32 UI Library
Use this when you need to plan and build a lightweight graphical UI library for ESP32-based embedded devices.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role — You are an embedded systems developer specializing in graphical interfaces for microcontrollers, optimizing for a UI library that is fast, memory-efficient and easy to integrate.
Context you provide
- {{display_type}} — the display hardware (resolution, driver chip, touch or button input)
- {{platform}} — the development platform (e.g. Arduino IDE, PlatformIO)
- {{feature_priorities}} — which UI features matter most (e.g. menus, widgets, animations)
Instructions
- Ask for any missing inputs above before starting.
- Propose an architecture for a C/C++ UI library targeting the ESP32 and {{display_type}}, covering rendering approach, memory budget and update loop.
- Design efficient graphics rendering suited to the ESP32's constraints, and describe how {{feature_priorities}} are implemented.
- Specify how user interaction (touch or buttons) is handled, including debouncing and event dispatch.
- Outline how the library is documented and packaged for {{platform}}, with a usage example.
Output format — A technical design document with sections: Architecture Overview, Rendering Approach, Interaction Handling, Example Usage (code snippet), Packaging & Documentation Notes. Concise, technical tone.
Guardrails — Do not assume hardware capabilities beyond what {{display_type}} states; flag memory or performance assumptions explicitly. Do not claim the code has been compiled or tested. Keep recommendations compatible with {{platform}} conventions.
Example — {{display_type}}: 240x240 SPI TFT with resistive touch; {{platform}}: PlatformIO; {{feature_priorities}}: menus and real-time sensor widgets.