¿que hice mal?

const byte ldrPin = A0;
...
int v = analogRead(ldrPin); // from 0 to 1023
int w = 1023 - analogRead(ldrPin); // from 1023 to 0