Introduction: CREATE SHADES WITH SIERPINSKI'S TRIANGLE AND SMART PHONE

About: I am a tech enthusiast and like making electronics stuffs and I basically like experiments with circuits and electronics

LED SHADES are awesome to watch and they mesmerize us as well as sooth our eyes and relax our brain . So in this article I will tell you how I created shades using SIERPINSKI'S TRIANGLE and your SMART PHONE via an application that you can built using HTML or CSS or any other programming language.

SO LET'S GET STARTED with the BUILD

YOU CAN ALSO GO VISIT MY CHANNEL ON YOUTUBE :GO ELECTRONICS

Step 1: UNDERSTANDING SIERPINSKI'S TRIANGLE

First lets understand the concept behind sierpinski's triangle which is based on FRACTALS

Fractals are never ending pattern that are SELF-SIMILIAR across different scales .They are created by repeating

a simple process over and over in an ongoing feedback loop .

Simple to say fractals are infinite patterns and keep o going . As you can see in the image that triangle inside a triangle inside a triangle to an infinite pattern .

Now we are going off topic so lets start with the build.

NOTE ; There is animation provided in the video on my YouTube channel .

GO ELECTRONICS

Step 2: CUTTING THE WOOD AND DRAWING THE TRIANGLE

So first Step towards the build was to get a piece of wood where I could draw the Sierpinski's triangle . So I took my HAND SAW and 3mm thickness plywood and started slitting a piece of wood 200 mm in length and 180 in width .

And after I was done I planned the Sierpinski's triangle on a piece of paper and then followed the guide lines and drew it on the piece of wood I had recently slashed . Then marked all the places where I could Fix the leds .

Step 3: DENTING AND DRILLING THE HOLES

With my Screw driver I dented all the places where I could drill the holes easily . After every hole was dented I started process of drilling holes.

Step 4: LEDS USED (RGBS AND WHITE LEDS)

After the drilling process was complete .It was time to reveal the most important component the RGB leds .

And we need approximately 30 RGB LEDS.

RGB leds consist of 4 Pins . One for RED , BLUE, GREEN AND (VCC if it is common anode or GND if common cathode )

Here we have used 30 common RGB LEDS.

But we also need some white leds to make our triangle look more robust . SO I took around 20 white leds .

Step 5: PLAN FOR FIXING LEDS

AFTER selecting all the led types it was time to reveal the plan of which led goes where .

Now the white leds goes in the inverse triangles whereas the RGB leds goes everywhere else as shown in the plan .

this makes our triangle look more lively and creative.

Step 6: FIXING THE LEDS

As the plan was complete now I started placing all the leds in place and soldering them together .For white leds the Positive terminal of all leds and and negative terminal of all leds were connected together . But for rgb leds I used Red wire for red pins blue for blue pins and green for green pins . SO that we don't mess up in the end . And after placing all the RGB leds I started the tedious as well as long process of Soldering .

Step 7: DOOMING WIRES

The Wiring after the soldering process looks a bit daunting but don't get scared its just a simple wiring scheme but it's a bit lengthy and takes much time . It took me around 3 hrs. soldering and managing the wiring scheme . now lets move towards the application.

Step 8: BUILDING THE APP

You can build this app using a HTML or CSS and its very basic application to build and work with

And a SIDE NOTE : to download the app go check the description of my video on YouTube

GO ELECTRONICS

Now Firstly at the top side you can see a Bluetooth logo and a label called not connected and when you click on the Bluetooth logo you can see a track of nearby Bluetooth devices .We use a BLUETOOTH MODULE HC-05 so when we click on HC-05 the text NOT CONNECTED turns to connected with the red color . And now when we click on different shades the sierpinski's triangle displays it .

Step 9: PROGRAMMING PART

const int redPin = 3;

const int bluePin = 6;

const int greenPin = 5;

char color = 0;

void setup() { // put your setup code here, to run once: pinMode(redPin,OUTPUT); pinMode(bluePin,OUTPUT);

pinMode(greenPin,OUTPUT);

Serial.begin(9600);

analogWrite(redPin,0);

analogWrite(bluePin,0);

analogWrite(greenPin,0);

}

void loop() { // put your main code here, to run repeatedly: if(Serial.available()>0){ color = Serial.read(); char value = char(color); if(value != '0') { Serial.println(value); } }

if(color == 'Y'){ analogWrite(redPin,0); analogWrite(bluePin,255); analogWrite(greenPin,0); }

if(color == 'W'){ analogWrite(redPin,0); analogWrite(bluePin,0); analogWrite(greenPin,0); }

if(color == 'R'){ analogWrite(redPin,0); analogWrite(bluePin,255); analogWrite(greenPin,255); }

if(color == 'P'){ analogWrite(redPin,0); analogWrite(bluePin,80); analogWrite(greenPin,70); }

if(color == 'O'){ analogWrite(redPin,0); analogWrite(bluePin,255); analogWrite(greenPin,90); }

if(color == 'M'){ analogWrite(redPin,0); analogWrite(bluePin,0); analogWrite(greenPin,255); }

if(color == 'C'){ analogWrite(redPin,255); analogWrite(bluePin,0); analogWrite(greenPin,0); }

if(color == 'G'){ analogWrite(redPin,255); analogWrite(bluePin,255); analogWrite(greenPin,0); }

if(color == 'B'){ analogWrite(redPin,255); analogWrite(bluePin,0); analogWrite(greenPin,255); } }

This code is very easy to interpret the firstly we declare the pins globally . Then initially write every pin as low or 0 so that initially they remain in off condition.

Then in void loop we check whether there is any incoming data and if there is data available we start running different colors according to data available . So go through the code carefully .

Step 10: SOOTH YOUR EYES AND RELAX YOUR BRAIN

NOW lets sooth our eyes and relax our brains by watching the fascinating shades controlled by the application we recently talked about

BUT FOR MORE DETAILS VISIT MY YOUTUBE CHANNEL : GO ELECTRONICS

Step 11: WATCH THE ENTIRE VIDEO

THANK YOU FOR WATCHING