Advertisement
atuline

rgbcalibrate.ino

Feb 4th, 2022
809
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1. // An RGBCalibrate
  2.  
  3. #include "FastLED.h"
  4.  
  5. #define NUM_LEDS 30
  6. #define DATA_PIN 12
  7.  
  8. CRGB leds[NUM_LEDS];
  9.  
  10. void setup() {
  11.   FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds, NUM_LEDS);
  12. }
  13.  
  14. void loop() {
  15.   leds[0] = CRGB(255, 0, 0);  // Red
  16.   leds[1] = CRGB(0, 255, 0);  // Green
  17.   leds[2] = CRGB(0, 255, 0);  // Green
  18.   leds[3] = CRGB(0, 0, 255);  // Blue
  19.   leds[4] = CRGB(0, 0, 255);  // Blue
  20.   leds[5] = CRGB(0, 0, 255);  // Blue
  21.   leds[6] = CHSV(0, 0, 255);  // https://github.com/FastLED/FastLED/wiki/Pixel-reference#setting-hsv-colors
  22.   FastLED.show();
  23.   delay(1000);
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement