Question.5
Sara has built the following circuit. She plotted the button press data on the Arduino’s serial plotter. After pressing the button for 200ms, which of the following waveforms will be plotted?
const int buttonPin = 4;
int buttonState = 0;
void setup() {
Serial.begin(115200);
pinMode(buttonPin, INPUT_PULLUP);
}
void loop() {
buttonState = digitalRead(buttonPin);
Serial.println(buttonState);
delay(1);
}