Karkhana

Arduino Based Acrylic Emblem Light

This Blog will illustrate to you how to make Color changing Emblen light using the PWM of Arduino.
using this you can make your emblems look more attractive.

Video Link

Components Required

  1. Arduino UNO
  2. 12V RGB led strip
  3. 2N2222 Transistor
  4. 10K ohm Resistor
  5. Jumper Wires
  6. Small Breadboard
  7. Acrylic Engraved Emblem
  8. IC7805 Power Regulator

Circuit Diagram 

Arduino Code

const int greenPin = 10;
const int bluePin = 9;
void setup() {
// Start off with the LED off.
setColourRgb(0,0,0);
}
void loop() {
unsigned int rgbColour[3];
// Start off with red.
rgbColour[0] = 255;
rgbColour[1] = 0;
rgbColour[2] = 0;
// Choose the colours to increment and decrement.
for (int decColour = 0; decColour < 3; decColour += 1) {
int incColour = decColour == 2 ? 0 : decColour + 1;
// cross-fade the two colours.
for(int i = 0; i < 255; i += 1) {
rgbColour[decColour] -= 1;
rgbColour[incColour] += 1;
setColourRgb(rgbColour[0], rgbColour[1], rgbColour[2]);
delay(5);
}
}
}
void setColourRgb(unsigned int red, unsigned int green, unsigned int blue) {
analogWrite(redPin, red);
analogWrite(greenPin, green);
analogWrite(bluePin, blue);
}
const int redPin = 11;

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on email
error:
Fill in the form for S’O’A Fablab Orientation 2021.