Adjustable led brightness using potentiometer

int potPin= A0; //Declare potPin to be analog pin A0
int LEDPin= 9; // Declare LEDPin to be arduino pin 9
int readValue; // Use this variable to read Potentiometer
int writeValue; // Use this variable for writing to LED

void setup() {
pinMode(potPin, INPUT); //set potPin to be an input
pinMode(LEDPin, OUTPUT); //set LEDPin to be an OUTPUT
Serial.begin(9600); // turn on Serial Port
}

void loop() {

readValue = analogRead(potPin); //Read the voltage on the Potentiometer
writeValue = (255/1023) * readValue; //Calculate Write Value for LED
analogWrite(LEDPin, writeValue); //Write to the LED
Serial.print("You are writing a value of "); //for debugging print your values
Serial.println(writeValue);
}
This simple code will not turn in my led to be able to adjust it need help

This simple code will not turn in my led to be able to adjust it need help

No.
How have you got things wired up?

writeValue = (255/1023) * readValue; //Calculate Write Value for LED

Strange way.

writeValue = readValue >> 2; // calculate write value for LED

Correct (bitshift) way.
Leo..

In fact Wawa has it:-

writeValue = (255/1023) * readValue;

The division in the brackets will result in a zero value because it is an integer division. So if you must do it this way then:-

writeValue = (255.0/1023.0) * float(readValue);

More efficient (using only ints not floats, which are way slower)

writeValue = 255L * readValue / 1023;

But not as efficient as the shift method mentioned above.

P.S use code tags in future please!