Maybe another example will help those who don't get the function of a diode. A couple of years ago I had to build a device that detected when pressure was applied to an air supply hose and started an electronic timer to accrue how long the device attached to the hose had been used. That required a timer module, pressure transducer, 9v battery, a resistor and a manual switch. But wired with those devices alone, the logic had 2 paths to take to/from the timer module (one was always "hot" due to the battery) and thus I got dual states when I only wanted one. That meant I had to place a diode on one leg of the circuit to ensure that the logic only worked along the path I intended. Once I added the diode, it worked flawlessly.