Project tutorial
Project 11

Project 11 © GPL3+

Every birthday is special. So that the party is remembered, the table decoration plays an essential role. Look at this.

  • 772 views
  • 0 comments
  • 4 respects

Components and supplies

Apps and online services

About this project

Every birthday is special. So that the party is remembered, the table decoration plays an essential role. To support the balloons, confetti and streamers, I've considered an electronic variant with Arduino technology.

My family is used to place the birthday year on the table. So far, these numbers were mostly made of paper, cardboard or wood. I wanted to surpass that time. The idea was directly pretty clear. It should be an 11 with different LEDs that are flashing.

At the beginning I wanted to take a simple bistable flip-flop and let the LEDs flash alternately. But I quickly rejected that. Who likes it when it only blinks all evening?

So it was clear that the project needed also a bit of programming. The Arduino Uno suits perfect for this. It offers the necessary numbers of outputs and programming is easy.

Symbolically, each LED is connected in this simple way directly to the pin via a resistor:

But you must not be fooled. If you use all the outputs, you have to handle a lot of wires. The resistors of the LEDs are placed on a small board, which also contains a plug for the Arduino. As a result, there is only one wire to the individual LEDs.

The wire to GND ist connected from LED to LED.

The power supply is implemented via 4 x 1.5 V batteries, which can be set on and off by a switch.

Light-Effects

How the LEDs are switched on an off, is decided by your on imagination. The effects I used can you watch in this video.

The Source-Code

The effects are stored in the voids Effect1 to Effect5.

Have fun with the next birthday party.

PS: Wenn Sie diesen Artikel in deutsch lesen möchten, schauen Sie doch auf techpluscode.de.

Code

projekt_11.inoArduino
int PinA1=0;
int PinB1=7;



void setup() {
  for (int i=PinA1;i<PinA1+7;++i)
    pinMode(i,OUTPUT);  
  for (int i=PinB1;i<PinB1+7;++i)
    pinMode(i,OUTPUT);  
}


void Effekt1() {
   int i;
  
    for (int i=1;i<=10;++i) {
      digitalWrite(PinA1+0,HIGH);
      digitalWrite(PinA1+2,HIGH);
      digitalWrite(PinA1+4,HIGH);
      digitalWrite(PinA1+6,HIGH);
      digitalWrite(PinA1+1,LOW);
      digitalWrite(PinA1+3,LOW);
      digitalWrite(PinA1+5,LOW);
      delay(300);
      digitalWrite(PinA1+0,LOW);
      digitalWrite(PinA1+2,LOW);
      digitalWrite(PinA1+4,LOW);
      digitalWrite(PinA1+6,LOW);
      digitalWrite(PinA1+1,HIGH);
      digitalWrite(PinA1+3,HIGH);
      digitalWrite(PinA1+5,HIGH);
      delay(300);
      digitalWrite(PinB1+0,HIGH);
      digitalWrite(PinB1+2,HIGH);
      digitalWrite(PinB1+4,HIGH);
      digitalWrite(PinB1+6,HIGH);
      digitalWrite(PinB1+1,LOW);
      digitalWrite(PinB1+3,LOW);
      digitalWrite(PinB1+5,LOW);
      delay(300);
      digitalWrite(PinB1+0,LOW);
      digitalWrite(PinB1+2,LOW);
      digitalWrite(PinB1+4,LOW);
      digitalWrite(PinB1+6,LOW);
      digitalWrite(PinB1+1,HIGH);
      digitalWrite(PinB1+3,HIGH);
      digitalWrite(PinB1+5,HIGH);
      delay(300);  
    } 
}

void Effekt2() {
    for (int i=1;i<=4;++i) {
       //Blau
      digitalWrite(PinA1+0,HIGH);
      digitalWrite(PinA1+2,HIGH);
      digitalWrite(PinA1+4,HIGH);
      digitalWrite(PinA1+6,HIGH);
      digitalWrite(PinB1+0,HIGH);
      digitalWrite(PinB1+2,HIGH);
      digitalWrite(PinB1+4,HIGH);
      digitalWrite(PinB1+6,HIGH);
      digitalWrite(PinA1+1,LOW);
      digitalWrite(PinA1+3,LOW);
      digitalWrite(PinA1+5,LOW);
      digitalWrite(PinB1+1,LOW);
      digitalWrite(PinB1+3,LOW);
      digitalWrite(PinB1+5,LOW);
      delay(2000);
      //Rot
      digitalWrite(PinA1+1,HIGH);
      digitalWrite(PinA1+3,HIGH);
      digitalWrite(PinA1+5,HIGH);
      digitalWrite(PinB1+1,HIGH);
      digitalWrite(PinB1+3,HIGH);
      digitalWrite(PinB1+5,HIGH);
      digitalWrite(PinA1+0,LOW);
      digitalWrite(PinA1+2,LOW);
      digitalWrite(PinA1+4,LOW);
      digitalWrite(PinA1+6,LOW);
      digitalWrite(PinB1+0,LOW);
      digitalWrite(PinB1+2,LOW);
      digitalWrite(PinB1+4,LOW);
      digitalWrite(PinB1+6,LOW);
      delay(2000);
    }
  
}

void Effekt3() {
 
  int i;

  for (i=6;i>=0;--i) {
    digitalWrite(PinA1+i,HIGH);
    digitalWrite(PinB1+i,HIGH);
    delay(1000);
  }
  
}


void Effekt4() {
 
  int i;

  for (i=0;i<=6;++i) {
    digitalWrite(PinA1+i,HIGH);
    digitalWrite(PinB1+i,HIGH);
    delay(1000);
  }
  
}

void Effekt4b() {
 
  int i;

  for (i=0;i<=6;++i) {
    digitalWrite(PinA1+i,LOW);
    digitalWrite(PinB1+i,LOW);
    delay(1000);
  }
  
}


void AlleEin() {
 
  int i;

  for (i=0;i<=6;++i) {
    digitalWrite(PinA1+i,HIGH);
    digitalWrite(PinB1+i,HIGH);
  }
  
}

void AlleAus() {
 
  int i;

  for (i=0;i<=6;++i) {
    digitalWrite(PinA1+i,LOW);
    digitalWrite(PinB1+i,LOW);
  }
  
}


void Effekt5() {
 
  int i;

  for (i=0;i<=6;++i) {
    AlleAus();
    digitalWrite(PinB1+i,HIGH);
    delay(300);
  }
  for (i=0;i<=6;++i) {
    AlleAus();
    digitalWrite(PinA1+i,HIGH);
    delay(300);
  }
 AlleAus();
  
}


void loop() {
  /*
  for (int i=PinA1;i<PinA1+8;++i) {
    digitalWrite(i,HIGH);
    delay(50);
    digitalWrite(i,LOW);
  }
  */
 Effekt5();
 Effekt4();
 Effekt4b();
 Effekt5();
 Effekt3();
 Effekt4b();
 Effekt5();
 Effekt2();
 Effekt1();
 Effekt5();
 AlleEin();
 delay(10000); 
 AlleAus(); 
}

Schematics

Schematics
schaltplan_QnK8AAXZHG.fzz

Comments

Similar projects you might like

Air Meter Making #2: Use the Arduino DHT 11 Module

by 4 developers

  • 3,538 views
  • 4 comments
  • 10 respects

LED Blink Pattern

Project tutorial by Matt Arnold

  • 30,376 views
  • 14 comments
  • 84 respects

Special Functions For The Kid's Cube

Project tutorial by Thomas Angielsky

  • 539 views
  • 0 comments
  • 0 respects

Arduino Lie Detector

Project tutorial by Dante Roumega

  • 42,432 views
  • 31 comments
  • 109 respects

Arduino and AC Devices - Automatic Lights

Project tutorial by Ahmed Hamdy

  • 21,952 views
  • 7 comments
  • 51 respects

How to Configure NeoPixels Using Vixen Lights and Arduino

Project tutorial by Victor Aguilar

  • 13,216 views
  • 23 comments
  • 28 respects
Add projectSign up / Login