Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to activate internal pull-up resistor when using more than one sensor? #56

Open
GreaseMonkey88 opened this issue Nov 15, 2022 · 2 comments

Comments

@GreaseMonkey88
Copy link

GreaseMonkey88 commented Nov 15, 2022

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?

Bildschirm­foto 2022-11-15 um 16 51 56

@hamster65
Copy link

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.

@GreaseMonkey88
Copy link
Author

Ok, I´ll try a different circuit.
But where in the code would I activate the internal pull up resistors on both pins?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants