A feedback system is one in which the output signal is sampled and then fed back to the input to form an output that drives the system. Meaning, a feedback systems gets input on itself. I designed two Feedback systems using multiple LEDs and a LDR the circuit is same for both of them but the codes are different. LDR reads the input from the flashed LEDs and according to that input turns on or off other LEDs. Basic Feedback System: In this circuit red and yellow leds' brightness change through time and LDR uses their brightness as input and flashes the green led. I used analogWrite(ledPin,sensorValue) to change the brightness of the green led. Green led's brightness change according to the LDR sensor's value. So, it changes according to other two leds brightness. That way the circuit takes input from itself.
Turn The Lights On! This circuit can be used as a game that the player is trying to turn on all the leds moving the LDR closer or further from the LEDs. The red light is always on but it's brightness change according to the LDR's value, so when we move LDR closer to the red LED it's brightness increase. When the LDR's value is in between 30 and 140 all the LEDs turn on. But LDR's value is calculated with a delay of 1000 miliseconds, so it will be tricky to get the value at the right time to turn on all the lights.