user77618: Been trying to figure this out for a couple hours, despite how ridiculously simple it should be. I have no idea why it's always returning 1, even when i'm pushing the button. Fritzing sketch:

My code:
#include <Servo.h>
#define button 3

Servo myservo1;
Servo myservo2;
Servo myservo3;

char incomingByte = "";
int timer;
int timer2;
int interval;
int numservo = 3;
int press1 = 90;
int letup = 0;
int val = 0;
  
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  myservo1.attach(9);
  myservo1.write(0);
  myservo2.attach(7);
  myservo2.write(0);
  myservo3.attach(5);
  myservo3.write(0);
  pinMode(button, INPUT_PULLUP);
  
}

void loop() {
  // put your main code here, to run repeatedly:

  val = digitalRead(button);
  Serial.println(val);
  
  //checkerthing();

    while (Serial.available() > 0) {
      incomingByte = Serial.read();
      timer  = incomingByte - '0';
      Serial.println(timer);
      timer2 = timer * 60;
      interval = timer2/numservo;
    


     motor1_control(press1, letup, interval);
     checkerthing();
     motor2control(press1, letup, interval);
     checkerthing();
     motor3control(press1, letup, interval);
     checkerthing();
     
      
      
     timer = 0;
     timer2 = 0;
     interval = 0;
    }

   

  }
    

void checkerthing() {
  val = digitalRead(button);
  if (val == LOW){ 
    Serial.println("Stopped");
    timer = 0;
    timer2 = 0;
    interval = 0;
    
  }
  if (val == HIGH){
    Serial.println("Still going");
  }

}
void motor1_control(int angle, int originalangle, int lengthoftime){
    myservo1.write(angle);
    delay(1000);
    myservo1.write(originalangle);
    delay(lengthoftime * 1000);
    
}

void motor2control(int angle, int originalangle, int lengthoftime){
    myservo1.write(angle);
    delay(1000);
    myservo1.write(originalangle);
    delay(lengthoftime * 1000);
    
}

void motor3control(int angle, int originalangle, int lengthoftime){
    myservo1.write(angle);
    delay(1000);
    myservo1.write(originalangle);
    delay(lengthoftime * 1000);
    
}

Basically, the point of this is to have the servo motors go off at specific intervals as given by the user in the serial monitor. The button exists so that the user can restart the timer at any point in the code. But the problem is, I can't even get it to register the button being pushed. It always returns "HIGH", which leads me to believe there's something wrong with the circuits. I've tried using some different methods, but no luck. Can anyone tell me what the issue here is?
Edit: ...I hadn't pushed the pushbutton all the way into the breadboard. I'm gonna go cry in the corner for a bit. And then get back to coding I guess lol. Thanks for the answers.

user77618: Hadn't pushed the button all the way in lol

77618: <p>Been trying to figure this out for a couple hours, despite how ridiculously simple it should be. I have no idea why it's always returning 1, even when i'm pushing the button. Fritzing sketch:
<a href="https://i.stack.imgur.com/gq7E1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gq7E1.png" alt="enter image description here" /></a></p>
<p>My code:</p>
<pre><code>#include &lt;Servo.h&gt;
#define button 3

Servo myservo1;
Servo myservo2;
Servo myservo3;

char incomingByte = &quot;&quot;;
int timer;
int timer2;
int interval;
int numservo = 3;
int press1 = 90;
int letup = 0;
int val = 0;
  
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  myservo1.attach(9);
  myservo1.write(0);
  myservo2.attach(7);
  myservo2.write(0);
  myservo3.attach(5);
  myservo3.write(0);
  pinMode(button, INPUT_PULLUP);
  
}

void loop() {
  // put your main code here, to run repeatedly:

  val = digitalRead(button);
  Serial.println(val);
  
  //checkerthing();

    while (Serial.available() &gt; 0) {
      incomingByte = Serial.read();
      timer  = incomingByte - '0';
      Serial.println(timer);
      timer2 = timer * 60;
      interval = timer2/numservo;
    


     motor1_control(press1, letup, interval);
     checkerthing();
     motor2control(press1, letup, interval);
     checkerthing();
     motor3control(press1, letup, interval);
     checkerthing();
     
      
      
     timer = 0;
     timer2 = 0;
     interval = 0;
    }

   

  }
    

void checkerthing() {
  val = digitalRead(button);
  if (val == LOW){ 
    Serial.println(&quot;Stopped&quot;);
    timer = 0;
    timer2 = 0;
    interval = 0;
    
  }
  if (val == HIGH){
    Serial.println(&quot;Still going&quot;);
  }

}
void motor1_control(int angle, int originalangle, int lengthoftime){
    myservo1.write(angle);
    delay(1000);
    myservo1.write(originalangle);
    delay(lengthoftime * 1000);
    
}

void motor2control(int angle, int originalangle, int lengthoftime){
    myservo1.write(angle);
    delay(1000);
    myservo1.write(originalangle);
    delay(lengthoftime * 1000);
    
}

void motor3control(int angle, int originalangle, int lengthoftime){
    myservo1.write(angle);
    delay(1000);
    myservo1.write(originalangle);
    delay(lengthoftime * 1000);
    
}
</code></pre>
<p>Basically, the point of this is to have the servo motors go off at specific intervals as given by the user in the serial monitor. The button exists so that the user can restart the timer at any point in the code. But the problem is, I can't even get it to register the button being pushed. It always returns &quot;HIGH&quot;, which leads me to believe there's something wrong with the circuits. I've tried using some different methods, but no luck. Can anyone tell me what the issue here is?</p>
<p>Edit: ...I hadn't pushed the pushbutton all the way into the breadboard. I'm gonna go cry in the corner for a bit. And then get back to coding I guess lol. Thanks for the answers.</p>
 77618: <p>Hadn't pushed the button all the way in lol</p>
