|
Analog Circuit Inspired by Flappy Bird Using Comparators and a Capacitor β‘
π This analog circuit is composed of two voltage comparators that share a common analog input. This input is generated by the charging and discharging of a capacitor, which is controlled by a switch operated by the user. Each comparator receives the same capacitor voltage at one input and a distinct sinusoidal signal at the otherβone sine wave for each comparator.
π The comparators continuously compare the capacitor voltage with their respective sine waves. Whenever the capacitor voltage crosses the voltage of either sine wave, the output of the corresponding comparator goes high. The outputs of both comparators are then connected to a logic OR gate, whose output drives a red LED.
π The LED turns on whenever the capacitor voltage crosses either of the boundaries defined by the sine waves, indicating a "collision." In this way, the circuit simulates the logic of the Flappy Bird game: the user must press the switch at the right moments to keep the capacitor voltage within the "safe zone" between the two sine waves. If the voltage crosses outside this zone, the LED lights up, simulating a game over.
|