We can avoid using an external pull-up or pull-down resistors, simply by using the internal existing pull-up resistor within Arduino. This may make life easier when we use pushbuttons.
In void setup() {} add digitalWrite(buttonPin1,HIGH);
Internally you set a pull up resistor to the pin. The state is HIGH when the button in not pressed, and LOW when it is pressed..
Try the circuit, I liked it alot for its simplicity.
Your new post is loading...