English
English
简体中文
日本語
pdf-icon

Arduino Quick Start

2. Devices & Examples

5. Extensions

6. Applications

Stamp-C5 Blue LED

Stamp-C5 Blue LED related APIs and example programs.

Example Programs

Compilation Requirements

  • M5Stack Board Manager version >= 3.3.8
  • Development board option = M5StampC5
cpp
1 2 3 4 5 6 7 8 9 10 11 12 13
#define BLUE_LED_PIN 28

bool blue_ledState = false;

void setup() {
  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