Assignment of read-only variable error

Hi, so recently I just made this project but it doesn't seems to work.. it kept on saying the same thing, and that is "Assignment of read-only variable 'VAL' I don't know what to do, so please check the code below and see if you can help me const int A = 13; const int B = 12; const int C = 11; const int ON = 500; const int OFF = 0; const int AYY = 10; const int VAL = 0;

void setup() { pinMode( A, OUTPUT ); pinMode( B, OUTPUT ); pinMode( C, OUTPUT ); pinMode( AYY, INPUT );

}

void loop() { VAL = digitalRead( AYY ); if(AY == HIGH ) { digitalWrite( A, HIGH ); delay( ON ); digitalWrite( A, LOW ); delay( OFF ); digitalWrite( B, HIGH ); delay( ON ); digitalWrite( B, LOW ); delay( OFF ); digitalWrite( C, HIGH ); delay( ON ); digitalWrite( C, LOW ); delay( 500 ); digitalWrite( A, HIGH ); digitalWrite( B, HIGH ); digitalWrite( C, HIGH ); delay( ON ); digitalWrite( A, LOW ); digitalWrite( B, LOW ); digitalWrite( C, LOW ); delay( 500 ); digitalWrite( A, HIGH ); digitalWrite( B, HIGH ); digitalWrite( C, HIGH ); delay( ON ); digitalWrite( A, LOW ); digitalWrite( B, LOW ); digitalWrite( C, LOW ); delay( 500 ); digitalWrite( C, HIGH ); delay( ON ); digitalWrite( C, LOW ); delay( OFF ); digitalWrite( B, HIGH ); delay( ON ); digitalWrite( B, LOW ); delay( OFF ); digitalWrite( A, HIGH ); delay( ON ); digitalWrite( A, LOW ); delay( 500 ); digitalWrite( A, HIGH ); digitalWrite( B, HIGH ); digitalWrite( C, HIGH ); delay( ON ); digitalWrite( A, LOW ); digitalWrite( B, LOW ); digitalWrite( C, LOW ); delay( 500 ); digitalWrite( A, HIGH ); digitalWrite( B, HIGH ); digitalWrite( C, HIGH ); delay( ON ); digitalWrite( A, LOW ); digitalWrite( B, LOW ); digitalWrite( C, LOW ); delay( 500 ); } else { digitalWrite( A, LOW ); digitalWrite( B, LOW ); digitalWrite( C, LOW ); }

Thank you.

I don't know what to do

You've told the compiler that the variable is not to be modified:

const int VAL = 0;

You have to decide why you did that, when you apparently don't want it to be const(ant).

There is an error here too.

if(AY == HIGH )