#include <Adafruit_NeoPixel.h>
int neo_pin = 9;
int no_of_leds = 32;
Adafruit_NeoPixel strip = Adafruit_NeoPixel(no_of_leds,neo_pin);
void setup() {
strip.begin();
Serial.begin(9600);
}
void loop() {
colorFunctionOne();
colorFunctionTwo();
}
int colorFunctionOne(){
for (int i=0;i<no_of_leds;i++){
if(i <= 8 ){
strip.setPixelColor(i,strip.Color(0,0,255));
strip.show();
delay(300);
Serial.println("Hello");
}else if(i < 20 && i > 8){
strip.setPixelColor(i,strip.Color(0,255,0));
strip.show();
delay(300);
}
else{
strip.setPixelColor(i,strip.Color(255,0,0));
strip.show();
delay(300);
}
}
}
int colorFunctionTwo(){
for (int i=0;i<no_of_leds;i++){
if(i <= 8 ){
strip.setPixelColor(i,strip.Color(30,120,150));
strip.show();
delay(300);
}else if(i < 20 && i > 8){
strip.setPixelColor(i,strip.Color(100,80,74));
strip.show();
delay(300);
}
else{
strip.setPixelColor(i,strip.Color(255,74,14));
strip.show();
delay(300);
}
}
}