qq push buttons without resistors?

The chip itself has a "Pull-up resistor" built into each pin, which can be activated in software.

But after you activate it, the button needs to be connected to ground, not 5v. And instead of reading when the pin goes HIGH, you'll want to check when it goes LOW.

To enable the Pull-up Resistor internally, you just need to do 2 simple things in your setup, first, make the buttonPin an input (like normal), and then use digitalWrite(buttonPin, HIGH); to enable the resistor.

Lol it's late, not sure I explained that well, but for example, this will turn on an LED for as long as you push the button:

int buttonPin = 10;  // change to whatever you want
int ledPin = 13; // just using for example
void setup()
{
     pinMode(ledPin, OUTPUT);     // LED as output
     pinMode(buttonPin, INPUT);    // button as input
     digitalWrite(buttonPin, HIGH); // turns on pull-up resistor after input

}

void loop()
{

     while(digitalRead(buttonPin) == LOW)   // when pin goes LOW
         {
             digitalWrite(ledPin, HIGH);           // turn on LED
          }
    digitalWrite(ledPin, LOW);        // well, turns led off!

}

One side of the button goes to your buttonPin, and the other side goes directly to GROUND. (Not 5v) That'll be safe for long run :slight_smile: