'Pot' question

Is it possible to write an int value as the value of a pot?

ie if pot value is 250; x=250?

in other words can you write the value of pot to value of x?

You mean assign the value of an analog pin reading that is connected to a pot? Yes, that's quite common...

The pot value is usually read in via analogRead() as a 10-bit number:

int pot;

pot = analogReading(Ax);

then you can manipulate from there:

potPWM = pot>>2 & 0xFF; // make it an 8-bit number

analogWrite (potPWM); // turn into 8-bit PWM output.

I had a brain fart before i posted it...walked away..came back and rewrote my code and fixed my problem.

so thanks for the responses.