int Ledpin = 10;
int analogPin = A0;
int val = 0;
void setup() {
// put your setup code here, to ru
pinMode(Ledpin, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
val = analogRead(A0);
analogWrite(Ledpin, val/4);
}