Introduction: How to Make Arduino Decoration Night Light

Picture of How to Make Arduino Decoration Night Light

दोस्तों मेरी पिछली पोस्ट में मैने आपको बताया था कि कैसे arduino की सहायता से एक LED Blink करें । पिछली पोस्ट पढने के लिए क्लिक करें ►

यदि आपने LED Blink करना अच्छी तरह सीख लिया है तो आप इस Decoration Light में खुद के Function बनाकर भी डाल पाएंगे ।

Step 1: आपको क्या-क्या चाहिए ?

Picture of आपको क्या-क्या चाहिए ?

2 x Green LED (5mm) -

2 x Blue LED (5mm)

4 x Resistor (150 ohm – 470 ohm के बीच ) [ मैंने 150 ohm का लगाया है ]

1 x Mini Breadboard -

1 x Arduino Board -

9 x Cardboard pieces (6 cm x 6 cm )

4 x Cardboard pieces (11.5 cm x 11.5 cm)

2 x Cardboard pieces (6 cm x 14 cm)

2 x A4 Size Paper Glue, Gum, Tape

Glue, Gum, Tape

Step 2: Arduino Decoration Light बनाना शुरु करें –

अब देर किस बात की ये खूबसूरत प्रोजेक्ट बनाना शुरु करते हैं । मैने इसका पूरा Video बनाया है आप बडे आराम से इसको देखकर अपना प्रोजेक्ट बनाएं ।

Step 3: Circuit –

Picture of Circuit –

b1 – arduino pin 2

g1 – arduino pin 4

g2 – arduino pin 3

b2 – arduino pin 2

negative – GND

Step 4: कोड Upload करें-

Picture of कोड Upload करें-
// MIGDREEM Arduino Decoration Lamp
// Created by Yogesh
// http://migdreem.com
// Date : 02-Sep-2017
const int g1 = 4;
const int g2 = 3;
const int b1 = 2;
const int b2 = 5;


// timing
int f3t1 = 80;
int f3t2 = 20;
int f4t1 = 100;
int f5t1 = 70;
int f6t1 = 100 ;
int f7t1 = 100;
int f8t1 = 150;


void setup() {
  pinMode(g1, OUTPUT);
  pinMode(g2, OUTPUT);
  pinMode(b1, OUTPUT);
  pinMode(b2, OUTPUT);
}


void loop() {


  //function 1
  for (int i = 0; i < 5; i++) {
    digitalWrite(b1, HIGH);
    digitalWrite(b2, HIGH);
    delay(100);
    digitalWrite(b1, LOW);
    digitalWrite(b2, LOW);
    delay(100);


    digitalWrite(g1, HIGH);
    digitalWrite(g2, HIGH);
    delay(100);
    digitalWrite(g1, LOW);
    digitalWrite(g2, LOW);
    delay(100);
  }


  //function 2
  for (int i = 0; i < 5; i++) {
    digitalWrite(b1, HIGH);
    delay(50);
    digitalWrite(g1, HIGH);
    delay(50);
    digitalWrite(g2, HIGH);
    delay(50);
    digitalWrite(b2, HIGH);
    delay(50);


    digitalWrite(b1, LOW);
    digitalWrite(g1, LOW);
    digitalWrite(g2, LOW);
    digitalWrite(b2, LOW);
    delay(300);
  }



  //function 3
  for (int i = 0; i < 5; i++) {
    digitalWrite(b2, HIGH);
    delay(f3t1);
    digitalWrite(b2, LOW);
    delay(f3t2);
    digitalWrite(g2, HIGH);
    delay(f3t1);
    digitalWrite(g2, LOW);
    delay(f3t2);
    digitalWrite(g1, HIGH);
    delay(f3t1);
    digitalWrite(g1, LOW);
    delay(f3t2);
    digitalWrite(b1, HIGH);
    delay(f3t1);
    digitalWrite(b1, LOW);
    delay(f3t2);
  }


  //function 7
  for (int i = 0; i < 5; i++) {
    digitalWrite(b1, HIGH);
    delay(f7t1);
    digitalWrite(b1, LOW);
    digitalWrite(b2, HIGH);
    delay(f7t1);
    digitalWrite(b2, LOW);
    digitalWrite(g1, HIGH);
    delay(f7t1);
    digitalWrite(g1, LOW);
    digitalWrite(g2, HIGH);
    delay(f7t1);
    digitalWrite(g2, LOW);
    delay(f7t1);
  }


  //function 4


  for (int i = 0; i < 5; i++) {

    digitalWrite(b1, HIGH);
    digitalWrite(g2, HIGH);
    delay(f4t1);
    digitalWrite(b1, LOW);
    digitalWrite(g2, LOW);
    digitalWrite(g1, HIGH);
    digitalWrite(b2, HIGH);
    delay(f4t1);
    digitalWrite(g1, LOW);
    digitalWrite(b2, LOW);
    delay(f4t1);


    digitalWrite(g1, HIGH);
    digitalWrite(b2, HIGH);
    delay(f4t1);
    digitalWrite(g1, LOW);
    digitalWrite(b2, LOW);
    digitalWrite(b1, HIGH);
    digitalWrite(g2, HIGH);
    delay(f4t1);
    digitalWrite(b1, LOW);
    digitalWrite(g2, LOW);
    delay(f4t1);
  }

  //function 5
  for (int i = 0; i < 15; i++) {
    digitalWrite(b1, HIGH);
    digitalWrite(g1, HIGH);
    digitalWrite(b2, HIGH);
    digitalWrite(g2, HIGH);
    delay(f5t1);
    digitalWrite(b1, LOW);
    digitalWrite(g1, LOW);
    digitalWrite(b2, LOW);
    digitalWrite(g2, LOW);
    delay(f5t1);
  }


  //function 6
  for (int i = 0; i < 5; i++) {
    digitalWrite(b1, HIGH);
    digitalWrite(g1, HIGH);
    delay(f6t1);
    digitalWrite(b1, LOW);
    digitalWrite(g2, HIGH);
    delay(f6t1);
    digitalWrite(g1, LOW);
    digitalWrite(b2, HIGH);
    delay(f6t1);
    digitalWrite(g2, LOW);
    digitalWrite(b2, LOW);
    delay(f6t1);
  }


  // function 8
  for (int j = 0; j < 1; j++) {
    for (int i = 0; i < 10; i++) {
      digitalWrite(g1, HIGH);
      digitalWrite(g2, HIGH);
      delay(f8t1);
      digitalWrite(g1, LOW);
      digitalWrite(g2, LOW);
      delay(f8t1);
    }
    for (int i = 0; i < 10; i++) {
      digitalWrite(b1, HIGH);
      digitalWrite(b2, HIGH);
      delay(f8t1);
      digitalWrite(b1, LOW);
      digitalWrite(b2, LOW);
      delay(f8t1);
    }
  }
}

Step 5:

कोड अपलोड करने के बाद USB निकाल दें और Arduino को 9 v की बैटरी से कनेक्ट कर दें । 9V Battery का +ve VIN से और –ve GND से connect करें ।

आपका प्रोजेक्ट तैयार है – इस प्रोजेक्ट Arduino Decoration Light को बनाने में कोई भी परेशानी आ रही हो तो कमेंट में जरूर लिखें । उम्मीद करता हूँ आपको ये जरूर पसन्द आया होगा तो सब्स्क्राइब जरूर करें |

पढने के लिए आपका धन्यवाद ! धन्यवाद ! धन्यवाद !

Comments

DIY Hacks and How Tos (author)2017-09-03

That would make a great night light for a child's room.

Thanks

About This Instructable

114views

1favorite

License:

Bio: Hi Friends My name is Yogesh. I love electronics and Arduino. Please visit my blog http://migdreem.com
More by MIGDREEM:7 Segment Display on Arduino in HindiWhat Is Arduino ( in Hindi )How to Make Arduino Decoration Night Light
Add instructable to: