Four LEDs light up in a row with the Nerdonic Exen Mini

Description: Four LEDs sharing the same ground pin with one resistor light up in a row one by one with the Nerdonic Exen Mini.

Four LEDs light up with Nerdonic Exen Mini

Supplies:

1 –  Breadboard 400 Points
1 – Nerdonic Exen Mini
4 – LED
1 – 220 Ohm Resistor

Arduino Code:

#define led1 A1
#define led2 A2
#define led3 A3
#define led4 A4

void setup() {

  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(led3, OUTPUT);
  pinMode(led4, OUTPUT);

}

void loop() {

  digitalWrite(led1, HIGH);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  delay(150);

  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(150);

  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(150);

  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(150);

}

Leave a Comment

98 − 94 =