Robolink Akademi - WS2812B İle Yürüyen Led Yapımı
Created
January 14, 2022 10:55
-
-
Save yemreeke/498c79e9e0e988a5f284c002cce87db2 to your computer and use it in GitHub Desktop.
Robolink Akademi - WS2812B İle Yürüyen Led Yapımı
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <FastLED.h> | |
#define NUM_LEDS 10 | |
#define DATA_PIN 7 | |
CRGB leds[NUM_LEDS]; | |
void setup() { | |
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS); | |
FastLED.setBrightness(255); | |
} | |
void loop() { | |
for(int i=0;i<10;i++){ | |
leds[i].setRGB(0,255,0); | |
FastLED.show(); | |
delay(300); | |
leds[i].setRGB(0,0,0); | |
FastLED.show(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment