LED Light Strip

HI EVERYONE

I have a programming question but first let me tell you what I am trying to do. I am trying to have multiple LED patterns controlled by a button on an arduino.The arduino or the code isnt recognizing the button. I have reason to believe that it is the code that is causing the problem so check it out. So please help me
here’s my code

#include <Adafruit_NeoPixel.h>

int buttonPin = 0; // momentary push button on pin 0
int oldButtonVal = 0;

#define PIN 1 // Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic ‘v1’ (not v2) FLORA pixels, WS2811 drivers)
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
#include <Adafruit_NeoPixel.h>
#include <LiquidCrystal.h>
const int button1Pin = 6; // pushbutton 1 pin

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
#define PIN 7

// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_RGB Pixels are wired for RGB bitstream
// NEO_GRB Pixels are wired for GRB bitstream
// NEO_KHZ400 400 KHz bitstream (e.g. FLORA pixels)
// NEO_KHZ800 800 KHz bitstream (e.g. High Density LED strip)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(60,7, NEO_GRB + NEO_KHZ800);

int nPatterns = 3;
int lightPattern = 1;

// the setup routine runs once when you press reset:
void setup() {

strip.begin();
strip.show(); // initialize all pixels to ‘off’
// initialize the BUTTON pin as an input
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print(“RC Dawson”);
pinMode(buttonPin, INPUT);
digitalWrite(buttonPin, HIGH); // button pin is HIGH, so it drops to 0 if pressed
}
// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
for(uint16_t i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
}

void rainbow(uint8_t wait) {
uint16_t i, j;

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

// Slightly different, this makes the rainbow equally distributed throughout
void rainbowCycle(uint8_t wait) {
uint16_t i, j;

for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel
for(i=0; i< strip.numPixels(); i++) {
strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));
}
strip.show();
delay(wait);
}
}

// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
if(WheelPos < 85) {
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
} else if(WheelPos < 170) {
WheelPos -= 85;
return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
} else {
WheelPos -= 170;
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
}
}
// Pattern 1 - Red light, all LEDs in the strip are red
void pattern1() {
lcd.setCursor(0, 1);
lcd.print(“Red Team”);
colorWipe(strip.Color(255, 0, 0), 50); // Blue

}

// Pattern 2 - Blue light, all LEDs in the strip are blue
void pattern2() {
lcd.setCursor(0, 1);
lcd.print(“Blue Team”);
colorWipe(strip.Color(0, 0, 255), 50);

}

// Pattern 3 - Rainbow light, all LEDs in the strip are different colors
void pattern3() {
lcd.setCursor(0, 1);
lcd.print(“Rainbow!!!”);

rainbow(20);
rainbowCycle(20);

}

// the loop routine runs over and over again forever;
void loop() {
int buttonVal = digitalRead(buttonPin);
if (buttonVal == LOW && oldButtonVal == HIGH) {// button has just been pressed
lightPattern == lightPattern + 1;
}
if (lightPattern > nPatterns) lightPattern = 1;
oldButtonVal = buttonVal;

switch(lightPattern) {
case 1:
pattern1();
break;
case 2:
pattern2();
break;
case 3:
pattern3();
break;
}
}

led_prototype_pattern.ino (5.1 KB)

#define PIN 1 
#define PIN 7

Why?

   lightPattern == lightPattern + 1;

lightPattern will never equal lightPattern + 1. Since you don't care, why are you even testing? == is NOT the assignment operator.