william46jemes
Published © Apache-2.0

Seven Segment display with leds

Seven Segment display with the help of led's where two led represent one segment of display which is control by Arduino

BeginnerProtip1,486
Seven Segment display with leds

Things used in this project

Story

Read more

Schematics

Circuit Diagram

Code

seven_segment_display.ino

C/C++
int led1=1;
int led2=2;
int led3=3;
int led4=4;
int led5=5;
int led6=6;
int led7=7;
void setup() {
  // put your setup code here, to run once:
pinMode(led1,OUTPUT);
pinMode(led2,OUTPUT);
pinMode(led3,OUTPUT);
pinMode(led4,OUTPUT);
pinMode(led5,OUTPUT);
pinMode(led6,OUTPUT);
pinMode(led7,OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,LOW);
delay(2000);
digitalWrite(led1,LOW);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,LOW);digitalWrite(led1,LOW);digitalWrite(led1,LOW);digitalWrite(led1,LOW);
delay(2000);
digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,LOW);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,LOW);digitalWrite(led1,HIGH);
delay(2000);
digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,LOW);digitalWrite(led1,LOW);digitalWrite(led1,HIGH);
delay(2000);
digitalWrite(led1,LOW);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,LOW);digitalWrite(led1,LOW);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);
delay(2000);
digitalWrite(led1,HIGH);digitalWrite(led1,LOW);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,LOW);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);
delay(2000);
digitalWrite(led1,HIGH);digitalWrite(led1,LOW);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);
delay(2000);
digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,LOW);digitalWrite(led1,LOW);digitalWrite(led1,LOW);digitalWrite(led1,HIGH);
delay(2000);
digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);
delay(2000);
digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);digitalWrite(led1,LOW);digitalWrite(led1,HIGH);digitalWrite(led1,HIGH);
delay(2000);
}

Credits

william46jemes

william46jemes

0 projects • 0 followers

Comments