// Simplest button-LED program
// https://wokwi.com/projects/470625111516071937
// Indicate the button status with a light
void setup() {
pinMode(LED_BUILTIN, INPUT_PULLUP);
}
void loop() {
}
// This relies on a special feature of the Arduino Uno R3
// The special feature is that the LED attached to pin13
// works as a logic probe.
// For how this works, see:
// https://forum.arduino.cc/t/education-demystifying-microcontrollers-using-atmega328p-and-assembly-to-understand-registers/1450268/1510?u=davex
// The "L" LED with the INTERNAL_PULLUP
will act as a logic probe of whatever "13"
is connected to. Try the pushbutton
or the top row of the keypad.