void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
/*pinMode(9, OUTPUT);
pinMode(5, INPUT);*/
}
void loop() {
  // put your main code here, to run repeatedly:
 int x = analogRead(A0);
  x=map(x,0,1023,0,255);
 analogWrite(9,(x-1));
Serial.println(x-1);
/*int y = digitalRead(5);
Serial.println(y);
digitalWrite(9,y);*/
delay(100);
}