Using a 9 Volt Battery to power an LED with an Arduino Nano

Description: This is how to correctly wire and connect a 9 Volt Battery to an Arduino Nano.

Notes: The red wire from the 9V battery goes to the Vin Pin and the black wire to ground(GND) on the Arduino Nano. Also, take note that the internal voltage regulator on the VIN pin should only be supplied between 7-12 Volts.

Supplies:

1 – Breadboard 400 Points
1 – Arduino Nano   >> Link <<
1 – 9 Volt Battery   >> Link <<
1 – LED
1 – 220 Ohm Resistor

Arduino Code:

int LEDred = 2;

void setup() {
  
  pinMode(LEDred, OUTPUT);
  
}

void loop() {
  
  digitalWrite(LEDred, HIGH);
  delay(700);
  digitalWrite(LEDred, LOW);
  delay(700);

}

Leave a Comment

3 + 6 =