Hannah’s neopixels

In retrospect I should have done something less lame with this. Tomorrow I want to try doing it with user input where you can put in the pixel number and the color and the neopixel will respond.

void loop() {

  pulseRed(5);
  pulseGreen(5);
  pulseBlue(5);

}

void pulseRed(uint8_t wait) {
  for(int j = 0; j < 256 ; j++){
      for(uint16_t i=0; i<strip.numPixels(); i++) {
          strip.setPixelColor(i, strip.Color(j,0,0) );
        }
        delay(wait);
        strip.show();
      }

  for(int j = 0; j < 256 ; j++){
      for(uint16_t i=0; i<strip.numPixels(); i++) {
          strip.setPixelColor(i, strip.Color(255,j,0) );
        }
        delay(wait);
        strip.show();
      }

  for(int j = 0; j < 256 ; j++){
      for(uint16_t i=0; i<strip.numPixels(); i++) {           
strip.setPixelColor(i, strip.Color(255,255,j) );          }          
delay(wait);          
strip.show();        }    
for(int j = 255; j >= 0 ; j--){
      for(uint16_t i=0; i<strip.numPixels(); i++) {
          strip.setPixelColor(i, strip.Color(j,j,j) );
        }
        delay(wait);
        strip.show();
      }
}

void pulseGreen(uint8_t wait) {
  for(int j = 0; j < 256 ; j++){
      for(uint16_t i=0; i<strip.numPixels(); i++) {
          strip.setPixelColor(i, strip.Color(0,j,0) );
        }
        delay(wait);
        strip.show();
      }

for(int j = 0; j < 256 ; j++){
      for(uint16_t i=0; i<strip.numPixels(); i++) {
          strip.setPixelColor(i, strip.Color(0,255,j) );
        }
        delay(wait);
        strip.show();
      }

for(int j = 0; j < 256 ; j++){
      for(uint16_t i=0; i<strip.numPixels(); i++) {           
strip.setPixelColor(i, strip.Color(j,255,255) );          }         
 delay(wait);          
strip.show();        }    
for(int j = 255; j >= 0 ; j--){
      for(uint16_t i=0; i<strip.numPixels(); i++) {
          strip.setPixelColor(i, strip.Color(j,j,j) );
        }
        delay(wait);
        strip.show();
      }
}

void pulseBlue(uint8_t wait) {
  
for(int j = 0; j < 256 ; j++){
      for(uint16_t i=0; i<strip.numPixels(); i++) {
          strip.setPixelColor(i, strip.Color(0,0,j) );
        }
        delay(wait);
        strip.show();
      }

for(int j = 0; j < 256 ; j++){
      for(uint16_t i=0; i<strip.numPixels(); i++) {
          strip.setPixelColor(i, strip.Color(j,0,255) );
        }
        delay(wait);
        strip.show();
      }

for(int j = 0; j < 256 ; j++){
      for(uint16_t i=0; i<strip.numPixels(); i++) {           
strip.setPixelColor(i, strip.Color(255,j,255) );          }           
delay(wait);           
strip.show();       }     
for(int j = 255; j >= 0 ; j--){
      for(uint16_t i=0; i<strip.numPixels(); i++) {
          strip.setPixelColor(i, strip.Color(j,j,j) );
        }
        delay(wait);
        strip.show();
      }
}