D-Link Forums
		D-Link IP Cameras for Home => DSH-C310 => Omna App => Topic started by: agalloway on March 21, 2025, 02:27:42 PM
		
			
			- 
				Hi everyone,
 
 I’m working on an Arduino project and need to read the state of a push button using digitalRead(). I’ve connected the button to a digital pin, but I’m unsure about pull-up/pull-down resistors and how to properly detect HIGH and LOW states. How to Use digitalRead in Arduino? - Technetron Electronics (https://technetronelectronics.com/how-to-use-digitalread-in-arduino/) provides some information, but I still have questions.
 
 Should I use an external resistor, or is the internal pull-up sufficient? Also, how can I debounce the button to avoid false readings? Any example code or best practices would be really helpful!
 
 Thanks in advance!