int sensorPin = A0;
int sensorValue = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
if(sensorValue>800){
digitalWrite(4, HIGH);
}
else{
digitalWrite(4, LOW);
}
delay(1000);
}