Martha MigliacioAlex Wong
Published © GPL3+

Using the Pmod OC1 with Arduino Uno

Application notes for Pmod OC1 and Arduino Uno. In this app, LEDs will light up and go out successively one after the other.

EasyProtip1 hour106
Using the Pmod OC1 with Arduino Uno

Things used in this project

Hardware components

Pmod OC1
Digilent Pmod OC1
×1
Anduino Arduino Uno
×1
LED (generic)
LED (generic)
×4
330 ohm resistor
×4
Digilent Solderless Breadboard Kit: Small
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Pmod OC1 and Arduino Uno Fritzing file

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

Pmod OC1 and Arduino Uno Fritzing Image

Fritzing image displaying the connection between the Pmod OC1 and Arduino Uno.
Pmodoc1arduinouno bb v9qx5gmafj

Code

Pmod OC1 and Arduino Uno Code

Arduino
Using this code will light up LEDs and turn them off successively one after the other.
/************************************************************************
*
* Test of the Pmod
*
*************************************************************************
* Description: Pmod_OC1
* The LEDs light up and go out successively one after the other.
*
* Material
* 1. Arduino Uno
* 2. Pmod OC1 (do not remove the jumper)
* 3. 4 LEDs with 4 330 ohm resistors
*
************************************************************************/

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

void loop()
{
 for(int i = 2; i < 6; i++)
 {
  digitalWrite(i,HIGH); // Saturation of the transistors
  delay(500);
  digitalWrite(i,LOW); // Blocking transistors
 }
}

Credits

Martha Migliacio

Martha Migliacio

5 projects • 2 followers
Contact
Alex Wong

Alex Wong

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

Comments

Add projectSign up / Login