Day 9: Continue light detector values with fritzing

Smoke Detector Project (completed):
we continued our project from yesterday and finally got it to work. we had a few problems and one of the problems was that it wold indicate that it was both light and dark at the same time. we had another problem where it was saying that it was dark when there was nothing over it so it should have been light. we also had the problem that it would say it was light when it should say there was no change we declared the first click or first set number variable as the old value. we then set it to repeat 512 times with a 3 second delay. we set the second click or second set number variable as the new number value. we tested if and only if the new value was less than the old value and th new value was less than or equal to the old value minus two, then we set digital pin 5 to high to indicate to the LED to light up and send a message saying indicating that it’s dark. we gave another test that if new value was greater than old value or new value was greater than or equal to old value plus 2, then we set digital pin 5 to low indicating to the LED not to activate with a message indicating hat it’s light. tested that if old value was equal to new value or old value minus one equals new value and old value plus one equals new value, then we send  message indicating that there was no change and t give us the value. we send a message at the end to indicate what the first click’s value was.
light sensor circuit 2 light sensor circuit fritz