void setup() {
  Serial.begin(9600);
  pinMode(?, INPUT);
  pinMode(?, OUTPUT);
}

void loop() {
  int value = analogRead(?);
  Serial.print("value : ");
  Serial.println (value);
  int val = map(value, 0, 1023, 0, 255);
  Serial.print("map: ");
  Serial.println(val);
  analogWrite(?,val);
  delay(1000);
}