EMBL01E - Expt 3

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

EXPERIMENT 3: ARDUINO 8 BIT BINARY LED SEQUENCER

OBJECTIVE(S):
1. To be able to explore the functionalities of the IDE.
2. To be able to program looping functions efficiently
3. To be able to implement LED Chaser and Inflow/Outflow mode using Arduino.

REQUIREMENTS:
1 Arduino Uno board and USB cable
8 LEDs
8 Resistors (optional)
1 Breadboard
Connecting wires

DISCUSSION:

An LED chaser or sequencer is a popular LED driving circuit. It’s used in running-light rope displays to
flash different lighting patterns. In a chaser or sequencer circuit, a controller commands the sequence and
timing of the flashing LEDs to illuminate different kinds of lighting patterns.
A light chaser serves as an LED driving circuit. It contains an arrangement of LEDs set in a certain pattern
to provide a chasing light effect.
The LEDs are controlled via the digital output from Arduino. The UNO is programmed to output logical
signals with different sequence over its pins with the appropriate timing pattern to show different LED light
patterns.
The so-called chaser or sequencer is one of the most popular types of LED-driving circuit and is widely
used in advertising displays and in running-light 'rope' displays in small discos, etc.

REFERENCE:
http://arduino.cc/en/Guide/HomePage
https://create.arduino.cc/projecthub/msr048/led-chaser-f6ec89
https://www.engineersgarage.com/articles-arduino-led-chaser-sequencer-13-light-patterns/

EMBL01E 1
PROCEDURE:

To learn more about sequential programming and good programming techniques for the I/O board,
it would be interesting to use the Knight Rider as a metaphor, as a set of LEDs that blinks one after another.

1. Problem: Using 8 LED’s as output, write a code/program that will perform the LED’s to perform
flashy effects of:

OPTION 1: LED Chaser Mode


OPTION 2: Inflow-Outflow Mode
2. Save your file and compile it.
3. Test your program.
4. Record the result/output. (Include discussion of output operation.)

DATA & RESULTS:


 Copy of Codes/Program with Comments
 Output/Result (Include discussion of output operation.)

EMBL01E 2
EXERCISES:
1. Modify your written code/program into a Random LED Chaser Mode
 Code the program efficiently by using looping functions.
 What to expect: Random LED Chaser Mode

2. What does count++ mean in the code: for (count = 0; count < 5; count++)?

3. What does i-- mean in the code: for (int i = 9; I > 2; i--)?

EMBL01E 3
4. What do the following code mean? Discuss its operation.
digitalWrite(pin2, HIGH);
delay(timer);
digitalWrite(pin2, LOW);
delay(timer);

SUMMARY & CONCLUSION:

EMBL01E 4

You might also like