Burning LED
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
- 1x 9V battery
- 1x Arduino UNO
- 4x LED
- 1x Half breadboard
- 2x jumper wires
- 1x Battery holder with power jack
- 1x USB type A to type B
Step 2:Stringing Components
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
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!
This project should be successful. If it doesn't work, maybe you are not careful enough. Look at the circuit or code.