I'm trying to make a circuit that turns a LED on or off by using a pulse voltage. The LED should turn on with a pulse of intensity A and off with a pulse of B, where A and B < 5V. Most of the time, this voltage will be null. Two additional constant DC voltage sources can be used.
I've thought about using OpAmps to determine whether the pulse is high or low enough, but the LED should only change states after the pulse, and it should stay in this new state until a new pulse happens.
What basic components (resistors, capacitors, inductors, OpAmps, diodes, MOSFETs) could be used to maintain the LED on after a pulse and have it off only after another pulse of different intensity?