void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int v = analogRead(A0);
Serial.println(v);
if(v>500)
{
digitalWrite(13, HIGH);
Serial.println("Light On");
}
else
{
digitalWrite(13,LOW);
Serial.println("light off");
}
}