#define BLUE 11
#define GREEN 10
#define RED 9
int resistor=0;
void setup() {
  Serial.begin(9600);
   pinMode(A0, INPUT);
   pinMode(RED,OUTPUT);
   pinMode(BLUE,OUTPUT);
   pinMode(GREEN,OUTPUT);
}

void loop() {
  resistor=analogRead(A0);
  Serial.println(resistor);
  if (resistor>500){
   digitalWrite(RED,HIGH );
  }
  else {
    digitalWrite(RED,LOW );
  }
  delay(100);
}
