quick question about storage and use of variables

Sorry for any mistakes, first project :)

The project is a time fountain in essence a glorified strobe light. I need the strobe to flash on for ms and be off for between 0ms and 20ms. I am using a potentiometer to return a value between 0 and 1023 and using this as the delay for low on the LED's.

I would like to narrow the range of values for a full rotation of the pot to tune the delay to a finer degree. I want to divide the value returned by the pot by 64 giving me a workable range. I have no idea how to do this ;D

Here is my code so far;

int potPin = 2;    // select the input pin for the potentiometer
int ledPin = 13;   // select the pin for the LED
int val = 0;       // variable to store the value coming from the pot

void setup() {
  pinMode(ledPin, OUTPUT);  // declare the ledPin as an OUTPUT
}

void loop() {
  val = analogRead(potPin);    // read the value from the sensor
  digitalWrite(ledPin, HIGH);  // turn the ledPin on
  delay(1);                    // stop the program for 1ms
  digitalWrite(ledPin, LOW);   // turn the ledPin off
  delay(val);                  // stop the program for some time
}

Is it correct to code;

int potPin = 2;    // select the input pin for the potentiometer
int ledPin = 13;   // select the pin for the LED
int val = 0;       // variable to store the value coming from the pot

void setup() {
  pinMode(ledPin, OUTPUT);  // declare the ledPin as an OUTPUT
}

void loop() {
  val = analogRead(potPin);       // read the value from the sensor
  digitalWrite(ledPin, HIGH);     // turn the ledPin on
  delay(1);                           // stop the program for some time1
  digitalWrite(ledPin, LOW);        // turn the ledPin off
  delay([glow]val/64[/glow]);          // stop the program for some time
}

I would just test this but I hav no acess to my board for a few weeks and I want to get the code sorted and plan the build.

Thanks for any help, comments and criticism ;D

Your division idea would work fine. There is also a range-mapping function available that lets you turn one range into another, e.g.

delay(map(val, 0,1024, 0,16));

The range mapping sounds perfect ;D Cheers!