pdf-icon

Arduino Quick Start

2. Devices & Examples

6. Applications

NanoC6 Blue LED Light

NanoC6 Blue LED Light related API and example program.

Example Program

Compilation Requirements

  • M5Stack Board Management version >= 3.2.5
  • Board Option = M5NanoC6
  • M5NanoC6 Library version = 1.0.0
cpp
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <M5NanoC6.h>
#define BLUE_LED_PIN 7
bool blue_ledState = false;

void setup() {
  NanoC6.begin();
  pinMode(BLUE_LED_PIN, OUTPUT);
}

void loop() {
  blue_ledState = !blue_ledState;
  digitalWrite(BLUE_LED_PIN, blue_ledState);
  delay(1000);
}

This program controls the blue LED on the device to blink at 1-second intervals, which can be used for status indication or debugging:

On This Page