/*******************************************************************
a neopixle rgb strp has 12 es2812 b led write a code in c plus in
 such a way that at first all leds chase with seven different colors 
 and then all lerds with even numbers blinks with seven different
  colors using 1 second delay after that others odd number
 leds blink with seven colors  
AUTHOR  ARVIND PATIL




*****************************************************************************/
#include <FastLED.h>
#include <LiquidCrystal_I2C.h>
#define LED_PIN     6
#define NUM_LEDS    12

CRGB leds[NUM_LEDS];
LiquidCrystal_I2C lcd(0x27, 20, 4);  // Address of LCD, 20 columns and 4 rows


void setup() {
  FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);

lcd.init();                      // Initialize the LCD
  lcd.backlight();                 // Turn on the backlight
  lcd.setCursor(0, 0);             // Set cursor to the first column and first row
  lcd.print(" by  arvind patil");       // Print "arvind patil" on the LCD

  lcd.backlight();                 // Turn on the backlight
  lcd.setCursor(0, 1);             // Set cursor to the first column and first row
  lcd.print("chases with 7 colors");       // Print "arvind patil" on the LCD
  lcd.backlight();                 // Turn on the backlight
  lcd.setCursor(0, 2);             // Set cursor to the first column and first row
  lcd.print("blinks odd num leds");       // Print "arvind patil" on the LCD
 lcd.backlight();                 // Turn on the backlight
  lcd.setCursor(0, 3);             // Set cursor to the first column and first row
  lcd.print("blinks even NUM_LEDS ");       // Print "arvind patil" on the LCD




}

void loop() {
  // First, chase all LEDs with seven different colors
  for (int i = 0; i < NUM_LEDS; i++) {
    leds[i] = CRGB::Red;
    FastLED.show();
    delay(100);
    leds[i] = CRGB::Green;
    FastLED.show();
    delay(100);
    leds[i] = CRGB::Blue;
    FastLED.show();
    delay(100);
    leds[i] = CRGB::Yellow;
    FastLED.show();
    delay(100);
    leds[i] = CRGB::Cyan;
    FastLED.show();
    delay(100);
    leds[i] = CRGB::Magenta;
    FastLED.show();
    delay(100);
    leds[i] = CRGB::White;
    FastLED.show();
    delay(100);
  }

  // Then, blink all even-numbered LEDs with seven different colors
  for (int i = 0; i < NUM_LEDS; i += 2) {
    leds[i] = CRGB::Red;
    FastLED.show();
    delay(1000);
    leds[i] = CRGB::Green;
    FastLED.show();
    delay(1000);
    leds[i] = CRGB::Blue;
    FastLED.show();
    delay(1000);
    leds[i] = CRGB::Yellow;
    FastLED.show();
    delay(1000);
    leds[i] = CRGB::Cyan;
    FastLED.show();
    delay(1000);
    leds[i] = CRGB::Magenta;
    FastLED.show();
    delay(1000);
    leds[i] = CRGB::White;
    FastLED.show();
    delay(1000);
  }

  // Then, blink all odd-numbered LEDs with seven different colors
  for (int i = 1; i < NUM_LEDS; i += 2) {
    leds[i] = CRGB::Red;
    FastLED.show();
    delay(1000);
    leds[i] = CRGB::Green;
    FastLED.show();
    delay(1000);
    leds[i] = CRGB::Blue;
    FastLED.show();
    delay(1000);
    leds[i] = CRGB::Yellow;
    FastLED.show();
    delay(1000);
    leds[i] = CRGB::Cyan;
    FastLED.show();
    delay(1000);
    leds[i] = CRGB::Magenta;
    FastLED.show();
    delay(1000);
    leds[i] = CRGB::White;
    FastLED.show();
    delay(1000);
  }
}
nano:12
nano:11
nano:10
nano:9
nano:8
nano:7
nano:6
nano:5
nano:4
nano:3
nano:2
nano:GND.2
nano:RESET.2
nano:0
nano:1
nano:13
nano:3.3V
nano:AREF
nano:A0
nano:A1
nano:A2
nano:A3
nano:A4
nano:A5
nano:A6
nano:A7
nano:5V
nano:RESET
nano:GND.1
nano:VIN
nano:12.2
nano:5V.2
nano:13.2
nano:11.2
nano:RESET.3
nano:GND.3
ring1:GND
ring1:VCC
ring1:DIN
ring1:DOUT
lcd1:GND
lcd1:VCC
lcd1:SDA
lcd1:SCL