Burning LED

by fahmi 2008 in Circuits > Arduino

386 Views, 4 Favorites, 0 Comments

Burning LED

20200510_203116.jpg

hi guys! this time I want to show the results of my project, i.e. led intensity. led intensity is a condition where the intensity of the LED changes every 200 milliseconds. make the value of the LEDs vary so that the LEDs look like a burning object. Without a long wait, let's see how to assemble them.

Step 1:Materials Needed

20200510_203354.jpg

  1. 1x 9V battery
  2. 1x Arduino UNO
  3. 4x LED
  4. 1x Half breadboard
  5. 2x jumper wires
  6. 1x Battery holder with power jack
  7. 1x USB type A to type B

Step 2:Stringing Components

Untitled Sketch.fzz_ - Fritzing - [Breadboard View] 5_10_2020 9_32_11 PM (3).png

arrange the components you provide. don't place the polarity (cathode-anode) wrong. Because it can cause this project to fail.Anode to digital 5.Cathode to GND.

Step 3:Code

intensitasLED _ Arduino 1.8.13 Hourly Build 2020_02_19 03_33 5_10_2020 8_41_59 PM.png

this project is very dependent on the code provided. Here is the code that must be uploaded to Arduino:

const int PIN_LED = 5; // Pin PWM

void setup() {

pinMode(PIN_LED, OUTPUT); }

void loop() {

int nilaiAcak = random(176);

analogWrite(PIN_LED, 60 + nilaiAcak);

delay(200); }

Step 4:It Works!

20200510_203116.jpg

This project should be successful. If it doesn't work, maybe you are not careful enough. Look at the circuit or code.