Skip to content

Instantly share code, notes, and snippets.

@yemreeke
Created January 14, 2022 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yemreeke/4fd158758d610cd9957c762b768cb663 to your computer and use it in GitHub Desktop.
Save yemreeke/4fd158758d610cd9957c762b768cb663 to your computer and use it in GitHub Desktop.
Robolink Akademi - WS2812B İle Birikerek Yürüyen Led Yapımı

Robolink Akademi - WS2812B İle Birikerek Yürüyen Led Yapımı

#include <FastLED.h>
#define NUM_LEDS 10
#define DATA_PIN 7
CRGB leds[NUM_LEDS];
byte Color_R = 255; //turuncu
byte Color_G = 85;
byte Color_B = 0;
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(Color_R, Color_G, Color_B);
FastLED.show();
delay(300);
}
for (int i = 0; i < 10; i++) {
leds[i].setRGB(0, 0, 0);
FastLED.show();
delay(300);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment