microcontrollers

MCU GPIO ADC PWM UART I²C SPI

pins


// Arduino button → LED (pull-up)
const int LED = 5, BTN = 2;

void setup() {
  pinMode(LED, OUTPUT);
  pinMode(BTN, INPUT_PULLUP);
}

void loop() {
  digitalWrite(LED, !digitalRead(BTN));
}
caution
mind logic levels (3.3 V vs 5 V). add level shifters where needed.
try this
start with serial prints; logging is the fastest debugger.