void setup() {
pinMode(A0,INPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
Serial.begin(9600);
}
void loop() {
Serial.println(analogRead(A0));
delay(250
);
if(analogRead(A0)>=0&&analogRead(A0)<160){
digitalWrite(2,HIGH);
}else { digitalWrite(2, LOW);}
if(analogRead(A0)>171&&analogRead(A0)<508){
digitalWrite(3,HIGH);
}else { digitalWrite(3, LOW);}
if(analogRead(A0)>508&&analogRead(A0)<853){
digitalWrite(4,HIGH);
}else { digitalWrite(4, LOW);}
if(analogRead(A0)>853&&analogRead(A0)<1030){
digitalWrite(5,HIGH);
}else { digitalWrite(5, LOW);}
}