Lesson 13 - Understanding Digital Input in Arduino
Learn how to read buttons and switches using pinMode(), INPUT/INPUT_PULLUP, and digitalRead().
Lesson Template
Read buttons and control LEDs using digital pins.
This lesson introduces the core ideas behind Digital I/O.
pinMode(2, OUTPUT);
digitalWrite(2, HIGH);
delay(500);
digitalWrite(2, LOW);Learn how to read buttons and switches using pinMode(), INPUT/INPUT_PULLUP, and digitalRead().
Learn how to control LEDs and other ON/OFF devices using pinMode(), digitalWrite(), and delay().