If you use an Arduino board with some other microcontroller, the value of an integrated pull-up resistors can be found at this link. We invite you in defining the pin using INPUT_PULLUP. pinMode(pin, INPUT_PULLUP); Products used in this tutorial See all products Coming soon ...
There’s a couple of things to note here. First, the Nano only has interrupts on IO pins 2 and 3 so the bottom door sensor had to be on one of these pins. I used pin 2 which is interrupt 0. Also, I wanted to drive the LED power supply with a PWM signal so I had to use o...