Check the supported device list and the device guides. Built-in screens and external display accessories can require different display classes and connection settings.
M5GFX supports Arduino for ESP32 and ESP-IDF. Add this library to your project and select the board configuration for your device. For Arduino used as an ESP-IDF component, see the project notes.
- Open a complete example from the example index.
- Check its display declaration and any device-specific configuration.
- Build and upload it using your board's development environment.
- Initialize the display before drawing. Read
width()andheight()after selecting the orientation so that your layout fits the current surface.
Start with graphics primitives to explore drawing, or image data to display an image. Keep an example's accompanying asset files with its sketch.