Arnov Sharma
Published © MIT

PCB Candle that glows forever- KINDA

PCB Candle is based on a simple flip-flop circuit by using two Transistors.

BeginnerFull instructions provided1 hour149

Things used in this project

Hardware components

PCBWay Custom PCB
PCBWay Custom PCB
×1
Capacitor 100 µF
Capacitor 100 µF
×2
bc547 transistors
×2
Resistor 10k ohm
Resistor 10k ohm
smd
×2
Through Hole Resistor, 240 ohm
Through Hole Resistor, 240 ohm
smd
×1
High Brightness LED, White
High Brightness LED, White
×1
LED, Orange
LED, Orange
×2

Story

Read more

Schematics

sch

Code

code

C/C++
int pinsCount=2;                        // declaring the integer variable pinsCount
int pins[] = {2,3};          // declaring the array pins[]
void setup() {
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
}
void loop() {
for (int i=0; i<pinsCount; i=i+1){    // chasing right
digitalWrite(pins[i], HIGH);         // switching the LED at index i on
delay(70);                          // stopping the program for 100 milliseconds
digitalWrite(pins[i], LOW);          // switching the LED at index i off
}
for (int i=pinsCount-1; i>0; i=i-1){   // chasing left (except the outer leds)
digitalWrite(pins[i], HIGH);         // switching the LED at index i on
delay(70);                          // stopping the program for 100 milliseconds
digitalWrite(pins[i], LOW);          // switching the LED at index i off
}
}

Credits

Arnov Sharma
333 projects • 339 followers
Just your average MAKER
Contact

Comments

Please log in or sign up to comment.