I’m pretty sure I soldered it correctly. I tested it with a multimeter and the resistance drops on button press.
So after that, I tried a program using it that just turns on the LED when pressed, akin to the basic button LED from other beginner projects.
But nothing happens when pressed.
// ZumoTesting.ino
#include <ZumoMotors.h>
#define LED_PIN 13
#define BUTTON_PIN 12
ZumoMotors motors;
int buttonState = 0;
void setup() {
pinMode(LED_PIN, OUTPUT);
pinMode(BUTTON_PIN, INPUT);
Serial.begin(9600);
}
void loop() {
// read the pushbutton input pin:
buttonState = digitalRead(BUTTON_PIN);
if(buttonState == LOW){
digitalWrite(LED_PIN, HIGH);
} else {
digitalWrite(LED_PIN, LOW);
}
}
I used buttonState == LOW because the documentation says, pressing pulls LOW.