pdf-icon

Arduino Quick Start

2. Devices & Examples

6. Applications

Arduino Nesso N1 Display

Arduino Nesso N1 display-related API and example program.

Example Program

Compilation Requirements

  • M5Stack board manager version >= 3.2.5
  • Board option = ArduinoNessoN1
  • M5GFX library version >= 0.2.17
  • M5Unified library version >= 0.2.11
cpp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include <M5Unified.h>

void setup() {
  M5.begin();
  M5.Display.setRotation(1);  // Set to landscape mode

  // Set text properties
  M5.Display.setTextDatum(MC_DATUM);              // Middle-Center datum for text alignment
  M5.Display.setTextColor(TFT_WHITE, TFT_BLACK);  // White text, black background
  M5.Display.setTextSize(2);

  // Clear the screen and draw the string
  M5.Display.fillScreen(TFT_BLACK);
  M5.Display.drawString("Hello, Nesso N1!", M5.Display.width() / 2, M5.Display.height() / 2);
}

void loop() {
  // Nothing to do in the loop
}

API

The display driver of Arduino Nesso N1 uses the M5GFX library. For more related APIs, please refer to the following documentation:

On This Page