-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathLEDTest.ino
More file actions
40 lines (29 loc) · 778 Bytes
/
Copy pathLEDTest.ino
File metadata and controls
40 lines (29 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (c) 2023 by GWENDESIGN. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
// https://github.com/FastLED/FastLED
#include <M5Station.h>
#include <FastLED.h>
#define NEO_PIXEL_NUM 7
#define NEO_PIXEL_PIN 4
#define NEO_PIXEL_BUTTON 3
CRGB NeoPixel[NEO_PIXEL_NUM];
void setup()
{
M5.begin();
FastLED.addLeds<SK6812, NEO_PIXEL_PIN, GRB>(NeoPixel, NEO_PIXEL_NUM);
}
void loop()
{
NeoPixel[NEO_PIXEL_BUTTON] = CRGB::Red;
FastLED.show();
delay(500);
NeoPixel[NEO_PIXEL_BUTTON] = CRGB::Green;
FastLED.show();
delay(500);
NeoPixel[NEO_PIXEL_BUTTON] = CRGB::Blue;
FastLED.show();
delay(500);
NeoPixel[NEO_PIXEL_BUTTON] = CRGB::Black;
FastLED.show();
delay(500);
}