Litwick Model

by jasminel4636 in Circuits > Arduino

212 Views, 0 Favorites, 0 Comments

Litwick Model

Litwick model

Use the LED and Arduino to design a display box.

I use the Breathing light code to create the LED under the model, it can show some kind the state of the candle's light.

Material

1111111111111111111111.png

Prepare what you need.

1. Arduino Uno x1

2. Led x1

3. Resistance x1

4. Wire jumper x2

Assemble Positive

2222222222.png

Use the jumper to connect your Arduino board and Breadboard.

First, you need to find the positive to input the electric current in your LED light.

I use "5v" to input electric in the breadboard and connect to the LED positive pin. (the longest pin is the positive pin)

Assemble Negative

333333333333333333333.png

Next, we need to connect the negative pin to the Arduino board.

Before we use the jumper to connect the negative pin of LED, don't forget to use resistance.

We need to use resistance because it is a function of the resistor is to make the electronic circuit work smoothly by limiting the current flow.

After we add on the breadboard and connect one pin on LED negative pin, you need to use jumper to connect "GND" on your Arduino board.

Input the Code

int led = 9;           // the pin that the LED is attached to
int Brightness = 0;    // how bright
int Fade = 5;    // how many points to fade 

void setup()  { 
  pinMode(led, OUTPUT);
} 

void loop()  { 
  analogWrite(led, Brightness);    
  Brightness = Brightness + Fade;

  if (Brightness == 0 || Brightness == 255) {
    Fade = -Fade ; 
  }     
  delay(35);  // how long it fade and bright                         
}

Decoration

55555555555.jpg

I use non-woven fabric, styrofoam, colored paper, scissors, tape, and a tissue box to make the decoration.

Finish

Litwick model
44444444.jpg