Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Hello World
- * Simply prints Hello World to the serial monitor.
- */
- #include <FastLED.h>
- #define NUM_LEDS 50
- #define DATA_PIN 6
- CRGB leds[NUM_LEDS];
- int ledCounter;
- void setup() {
- // initialize serial communications at 9600 bps
- FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
- Serial.begin(9600);
- ledCounter=0;
- }
- void loop() {
- Serial.println("Hello World.");
- //leds[ledCounter] = CRGB::Black;
- ledCounter++;
- if (ledCounter>=NUM_LEDS)ledCounter=0;
- leds[ledCounter] = CRGB::SkyBlue;
- FastLED.show();
- delay(30);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement