pdf-icon

Arduino Quick Start

2. Devices & Examples

6. Applications

Arduino Nesso N1 LED

Arduino Nesso N1 LED indicator-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
#include "M5Unified.h"

void setup() {
  auto cfg = M5.config();
  M5.begin(cfg);
}

void loop() {

  // LED_BUILTIN at E1.P7
  auto& ioe = M5.getIOExpander(1);
  ioe.digitalWrite(7, false);
  delay(1000);
  ioe.digitalWrite(7, true);
  delay(1000);
}
On This Page