I recently started working with the Arduino R4 Wifi to create a component in my garage for sensing when the garage door is up or down (using 2 magnet activated door sensors, one for up, one for down).
After learning the R4 doesn't have built in pull-up resistors, I implemented my own using 10k resistors, following the proper wiring from several online examples.
It was working fine, for a few days, then the door down sensor stopped working because the resistor got fried (and event melted a little of my breadboard).
Later I switched to pulldown resistors (and adjusted my logic), and the same thing happened.
TL;DR;
Eventually I created this simple wiring below (using 10K resistor), and used the provided Example "Button" sketch, but modified it to not use the built in pullup resistor .
Pictures:
When I hold the button down, the resistor gets VERY hot. When I put a volt meter between the resistor and ground, I see the volts go up to 5v and amps at .3 when the button is closed.
If I understand wattage correctly, that's 5 x 0.3 = 1.5 watts. My resistors are the ones that comes with the ELEGOO Mega Starter Kit, so I don't know the watt rating.
So is my solution to buy 2 watt resistors? Or can use multiple ones in parallel?
Or would just a higher rated resistor work (like 1M)?
I just see so many examples using 10k, I'm surprised mine got burnt up like this.