Project 10 Zoetrope UNKNOWN ERROR MESSAGE

Hi

In this project, I cannot upload the code because of error message: "exit status 1
assignment of read-only variable 'controlPin1"
I cant spot a difference in any code available on the internet. Can you please tell me where the error is and tell me how to repair it?

Thanks

const int controlPin1 = 2;
const int controlPin2 = 3;
const int enablePin = 9;
const int directionSwitchPin = 4;
const int onOffSwitchStateSwitchPin = 5;
const int potPin = A0;

int onOffSwitchState;
int previousOnOffSwitchState;
int directionSwitchState;
int previousDirectionSwitchState;

int motorEnabled;
int motorSpeed;
int motorDirection = 1;
void setup() {
  pinMode(directionSwitchPin, INPUT);
  pinMode(onOffSwitchStateSwitchPin, INPUT);
  pinMode(controlPin1, OUTPUT);
  pinMode(controlPin2, OUTPUT);
  pinMode(enablePin, OUTPUT);

  digitalWrite(enablePin, LOW);
}

void loop() {
  onOffSwitchState = digitalRead(onOffSwitchStateSwitchPin);
  delay(1);
  directionSwitchState = digitalRead(directionSwitchPin);
  motorSpeed = analogRead(potPin)/4;

  if(onOffSwitchState != previousOnOffSwitchState){
    if(onOffSwitchState == HIGH){
      motorEnabled = !motorEnabled ;
    }
  }
  if(directionSwitchState != previousDirectionSwitchState){
    if(directionSwitchState == HIGH){
      motorDirection = !motorDirection;
    }
  }
  if(motorDirection == HIGH){
    digitalWrite(controlPin1 = HIGH);
    digitalWrite(controlPin2 = LOW);
  }
  else{
    digitalWrite(controlPin1 = LOW);
    digitalWrite(controlPin2 = HIGH);
  }
  if(motorEnabled = 1){
    analogWrite(enablePin, motorSpeed);
  }
  previousDirectionSwitchState = DirectionSwitchState;
  previousOnOffSwitchState = onOffSwitchState;
}
    digitalWrite(controlPin1 = LOW);

Right there

if(motorEnabled = 1){

Oops

Can you please tell me where the error is

If you look carefully, I bet the compiler has already told you that.

else{
    digitalWrite(controlPin1 = LOW);
    digitalWrite(controlPin2 = HIGH);

That's not what a digitalWrite statement normally looks like. Why don't you look at some examples of digitalWrite.