Open GreaseMonkey88 opened 1 year ago
Your circuit is wrong. Do not connect D5 to D2. You have to use two external resistors between the Pins and 3,3V. Or activate the internal pull up resistors on both pins.
Ok, I´ll try a different circuit. But where in the code would I activate the internal pull up resistors on both pins?
Excuse my question, but I'm not too deep into programming. If I add another sensor, like in the circuit below, it will always pull both pins to ground as soon as one sensor opens. So my approach would be to activate the internal pull-up resistors to the sensor pin. But how?