const int ledPin = 4;
const int analogPin = A0;
int inputPin = 0;
int outputPin = 0;
void setup() {
  // put your setup code here, to run once:
  pinMode(ledPin, OUTPUT);
  pinMode(analogPin, INPUT);
}
void led_with_Poten() {

  inputPin = analogRead(analogPin);
  outputPin = map(inputPin, 0, 1023,0,255);
  analogWrite(ledPin, outputPin);
}
void loop() {
  // put your main code here, to run repeatedly:
  led_with_Poten();
  
}