Martha MigliacioAlex Wong
Published © GPL3+

Using the Pmod LED with Arduino Uno

Application notes for Pmod LED and Arduino Uno. In this app, LEDs will light up one after another before turning off.

EasyProtip1 hour61
Using the Pmod LED with Arduino Uno

Things used in this project

Hardware components

Pmod LED
Digilent Pmod LED
×1
Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Pmod LED and Arduino Uno Fritzing file

Fritzing file displaying the connection of the Pmod LED to the Arduino Uno.

Pmod LED and Arduino Uno Fritzing Image

Fritzing image displaying the connection between the Pmod LED and Arduino Uno.
Pmodled arduinouno bb y1wvqi073k

Code

Pmod LED and Arduino Uno Code

Arduino
Using this code will successfully turn the LEDs on one after another before turning off.
/************************************************************************
*
* Test of the Pmod LED
*
*************************************************************************
* Description: Pmod_LED
* LEDs light successively one after the other,
* and then turn off.
*
* Material
* 1. Arduino Uno
* 2. Pmod LED
*
************************************************************************/

void setup()
{
for (int i=2; i<=5; i++) // configuration of pins 2 to 5 in output
 {
pinMode(i,OUTPUT);
 }
}

void loop()
{
for(int i = 2; i<=5; i++) // 4 LEDs turn on
 {
digitalWrite(i,HIGH);
delay(250);
 }
for(int i = 2; i<=5; i++) // 4 LEDs turn off
  {
digitalWrite(i,LOW);
  }
delay(250);
}

Credits

Martha Migliacio

Martha Migliacio

5 projects • 5 followers
Alex Wong

Alex Wong

5 projects • 13 followers
I work in Digilent and like creating projects
Thanks to Lextronics.

Comments

Add projectSign up / Login