int potPin = A1;
int gPin=6;
int potVal;
float LEDVal;
void setup() {
// put your setup code here, to run once:
pinMode(gotPin , INPUT);
pinMode(gpin , OUTPUT);
serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
potVal=analogRead(potPin)
LEDVal=(255./1023.)*potVal;
analogWrite(gpin , LEDVal);
Serial.println(LEDVal);
}