Led strip non working

I try to make a project-LED strip. when I made it, I uploaded the code, but like there's modes, on two strips, white and blue, and the mode doesn't change when I press the button. Here's the code:

const int LIGHTPUSHBUTTON = 2;
int buttonstate;
int prev_buttonstate;
int MODE = 1;
void setup() {
pinMode(LIGHTPUSHBUTTON,INPUT_PULLUP);
pinMode(A0,OUTPUT);
pinMode(A1,OUTPUT);
}
void loop() {
buttonstate == digitalRead(LIGHTPUSHBUTTON);
int brightness1 = 127;
int brightness2 = 255;
if (prev_buttonstate == LOW && buttonstate == HIGH)
  MODE == MODE +1;

if (MODE = 1) {
  digitalWrite(A0,HIGH);
  digitalWrite(A1,LOW);
}
if (MODE = 2) {
  digitalWrite(A1,HIGH);
  digitalWrite(A0,LOW);
}
while (MODE = 3) {
  analogWrite(A0,brightness1);
  analogWrite(A1,brightness2);
  if (brightness1 <= 127) {
    BrightnessUp(brightness1);
    BrightnessDown(brightness2);   
  }
  if (brightness2 <= 127){
    BrightnessUp(brightness2);
    BrightnessDown(brightness1);
  }
  DelayHalfSecs();
  analogWrite(A0,brightness1);
  analogWrite(A1,brightness2);
}
  prev_buttonstate = buttonstate;
}
void BrightnessUp(int brightness) {
  brightness++;
}
void BrightnessDown(int brightness){
  brightness--;
}
void DelayHalfSecs(){
  unsigned long previoustime;
  previoustime = millis();
  while (millis() - previoustime < 500UL) {
    ;
  }
}

So anybody please help!

Ponder those lines a few moments, would you? I imagine your rookie error will soon become apparent to you.

A couple more lines you should look at.

Oh, and you should really turn your compiler warning level to ALL. It'll flag each one of those lines.

Problem may exist in your power supply too. Did you check that?

@The_3_Arduiner can make some fixes, but needs to look at how while loops work.

https://docs.arduino.cc/language-reference/en/structure/control-structure/while/



Something must change the tested variable, or the while loop will never exit.

a7