CREATE SHADES WITH SIERPINSKI'S TRIANGLE AND SMART PHONE

by devamparmar000 in Circuits > Arduino

310 Views, 2 Favorites, 0 Comments

CREATE SHADES WITH SIERPINSKI'S TRIANGLE AND SMART PHONE

Screenshot_20201013-150026_Video_Player-02[1].jpeg

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

UNDERSTANDING SIERPINSKI'S TRIANGLE

Screenshot_20201014-181750_Video_Player[1].jpg
Screenshot_20201014-181810_Video_Player[1].jpg

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

CUTTING THE WOOD AND DRAWING THE TRIANGLE

Screenshot_20201014-181857_Video_Player[1].jpg
Screenshot_20201014-181920_Video_Player[1].jpg
Screenshot_20201014-181926_Video_Player[1].jpg

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 .

DENTING AND DRILLING THE HOLES

Screenshot_20201014-181936_Video_Player[1].jpg

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.

LEDS USED (RGBS AND WHITE LEDS)

Screenshot_20201014-181955_Video_Player[1].jpg
Screenshot_20201014-182003_Video_Player[1].jpg
Screenshot_20201014-182015_Video_Player[1].jpg

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 .

PLAN FOR FIXING LEDS

Screenshot_20201014-182026_Video_Player[1].jpg
Screenshot_20201014-182035_Video_Player[1].jpg

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.

FIXING THE LEDS

Screenshot_20201014-182120_Video_Player[1].jpg
Screenshot_20201014-182051_Video_Player[1].jpg

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 .

DOOMING WIRES

Screenshot_20201014-182145_Video_Player[1].jpg
20201014_213034[1].jpg

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.

BUILDING THE APP

Screenshot_20201014-213937_Video_Player[1].jpg
Screenshot_20201014-214021_Video_Player[1].jpg
Screenshot_20201014-214043_Video_Player[1].jpg
Screenshot_20201014-214223_Video_Player[1].jpg

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 .

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 .

SOOTH YOUR EYES AND RELAX YOUR BRAIN

Screenshot_20201014-182242_Video_Player[1].jpg
Screenshot_20201014-182236_Video_Player[1].jpg
Screenshot_20201014-182251_Video_Player[1].jpg
Screenshot_20201014-182258_Video_Player[1].jpg
Screenshot_20201014-182232_Video_Player[1].jpg
Screenshot_20201014-182306_Video_Player[1].jpg
Screenshot_20201014-182314_Video_Player[1].jpg

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

WATCH THE ENTIRE VIDEO

Shades🎨 Using Sierpinski's 🔺️triangle🔺️smart phone📲

THANK YOU FOR WATCHING