[go: up one dir, main page]

0% found this document useful (0 votes)
8 views2 pages

Scrolling WELCOME 7segment Arduino Project

This document provides instructions for creating a scrolling 'WELCOME' message on a 7-segment display using an Arduino UNO. It includes a list of required components, pin mapping for the segments, and Embedded C code to display each character sequentially. The code demonstrates how to control the segments to approximate the letters and suggests enhancements like adding delays or using multiple displays for improved effects.

Uploaded by

hari755813
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Scrolling WELCOME 7segment Arduino Project

This document provides instructions for creating a scrolling 'WELCOME' message on a 7-segment display using an Arduino UNO. It includes a list of required components, pin mapping for the segments, and Embedded C code to display each character sequentially. The code demonstrates how to control the segments to approximate the letters and suggests enhancements like adding delays or using multiple displays for improved effects.

Uploaded by

hari755813
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Scrolling 'WELCOME' on 7-Segment Display using Arduino (Embedded C)

Components Required:

- Arduino UNO

- 1x 7-Segment Common Cathode Display

- 220 Ohm resistors (7 pcs)

- Breadboard and jumper wires

- USB cable for Arduino

Pin Mapping:

Segment A -> Arduino Pin 2

Segment B -> Arduino Pin 3

Segment C -> Arduino Pin 4

Segment D -> Arduino Pin 5

Segment E -> Arduino Pin 6

Segment F -> Arduino Pin 7

Segment G -> Arduino Pin 8

Working Principle:

A 7-segment display can't show the full word 'WELCOME' at once, so each character will be shown

one by one for a short duration to create a scrolling effect.

Embedded C Code (Arduino):

int segA = 2;
int segB = 3;
int segC = 4;
int segD = 5;
int segE = 6;
int segF = 7;
int segG = 8;

void displayChar(char c) {
digitalWrite(segA, LOW); digitalWrite(segB, LOW);
digitalWrite(segC, LOW); digitalWrite(segD, LOW);
digitalWrite(segE, LOW); digitalWrite(segF, LOW);
digitalWrite(segG, LOW);
switch (c) {
case 'W': digitalWrite(segB, HIGH); digitalWrite(segD, HIGH);
digitalWrite(segF, HIGH); digitalWrite(segC, HIGH); break;
case 'E': digitalWrite(segA, HIGH); digitalWrite(segD, HIGH);
digitalWrite(segE, HIGH); digitalWrite(segF, HIGH);
digitalWrite(segG, HIGH); break;
case 'L': digitalWrite(segD, HIGH); digitalWrite(segE, HIGH);
digitalWrite(segF, HIGH); break;
case 'C': digitalWrite(segA, HIGH); digitalWrite(segD, HIGH);
digitalWrite(segE, HIGH); digitalWrite(segF, HIGH); break;
case 'O': digitalWrite(segA, HIGH); digitalWrite(segB, HIGH);
digitalWrite(segC, HIGH); digitalWrite(segD, HIGH);
digitalWrite(segE, HIGH); digitalWrite(segF, HIGH); break;
case 'M': digitalWrite(segA, HIGH); digitalWrite(segC, HIGH);
digitalWrite(segE, HIGH); digitalWrite(segF, HIGH); break;
}
}

void setup() {
for (int i = 2; i <= 8; i++) pinMode(i, OUTPUT);
}

void loop() {
char message[] = {'W', 'E', 'L', 'C', 'O', 'M', 'E'};
for (int i = 0; i < sizeof(message); i++) {
displayChar(message[i]);
delay(1000);
}
}

Notes:

- Characters like 'M' or 'W' are hard to represent on a 7-segment display. The code uses

best-approximations.

- You may add delays or use multiple displays with multiplexing for better effects.

You might also like