Firefly

Ryan Ferguson

void setup() {

  Serial.begin(9600);

  pinMode(13, OUTPUT);

  pinMode(A0, INPUT_PULLUP);

}


void loop() {

  int brightness = analogRead(A0);

  if (brightness >= 400) {

    digitalWrite(13, HIGH);

  }

  else {

    digitalWrite (13, LOW);

  }

  Serial.println(brightness);

}