// analog read from A0 then LED at 8

int LED = 8 ;

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

void loop() {
int pot= analogRead(A0) ;
Serial.print("pot= ") ;
Serial.print(pot) ;

float volt=(pot/1023.0)*5.0 ;
Serial.print("  volt= ") ;
Serial.println(volt) ; 

 if(volt <=0.3) {
 digitalWrite(LED, HIGH) ;  } 
 else { digitalWrite(LED, LOW) ; }
 delay(50) ;
}