Introduction: LED Heart

Picture of LED Heart

Hello Instructables!

This is my second instructables.

Who said that electronics can’t be romantic?

We can use it to show a person our love, and it is exactly what we are going to do: a present, as simple to realize as wonderful to see, to give to the person we love.

It could be a great gift for Valentine’s Day or anniversary.

some little red LEDs arranged in a heart shape.

You can see the final result in the picture above. It's amazing!

Step 1: What We Need

Picture of What We Need

These are the components

26 red LED

one switch

one battery case (5v)

soldering kit

atmega16

usbasp programmer

general board

wires

Step 2: Making Heart

Picture of Making Heart

step 1: use proteus

step 2: create program (winavr)

step 3: check it into proteus

step 4: implement the circuit on general pcb board

step 5: burn the .hex into atmega16 through usbasp programmer

Step 3: Code

1111111111111#include<avr/io.h>

#include<util/delay.h>

int main(i,Z,J,Q,A,B,C,D,e,f,g,h,m,n)

{

DDRA=0xff;

DDRB=0XFF;

DDRC=0XFF;

DDRD=0XFF;

while(1)

{ for(i=128,Z=1,i>=1,Z<=128;i&&Z;i=i/2,Z=Z*2)

{

PORTA|=i;

_delay_ms(20);

PORTD|=Z;

}

for(J=1,Q=128,J<=128,Q>=16;J&&Q;J=J*2,Q=Q/2)

{ PORTB|=J;

_delay_ms(20);

PORTC|=Q;

}

{ PORTA=0X00; PORTB=0X00; PORTC=0X00; PORTD=0X00; _delay_ms(50); } for(A=128,B=1,A>=1,B<=128;A&&B;A=A/2,B=B*2)

{ PORTA=A;

_delay_ms(20);

PORTD=B;

}

{ PORTA=0b00000000;

PORTD=0b00000000;

_delay_ms(20);

}

for(C=1,D=128,C<=128,D>=16;C&&D;C=C*2,D=D/2)

{

PORTB=C;

_delay_ms(20);

PORTC=D;

}

{

PORTA=0X00; PORTB=0X00; PORTC=0X00; PORTD=0X00; _delay_ms(50);

PORTA=0XFF; PORTB=0XFF; PORTC=0XFF; PORTD=0XFF; _delay_ms(50);

PORTA=0X00; PORTB=0X00; PORTC=0X00; PORTD=0X00; _delay_ms(50);

PORTA=0XFF; PORTB=0XFF; PORTC=0XFF; PORTD=0XFF; _delay_ms(50);

}

for(m=1;m<=5;m++)

{

PORTA=0XFF; PORTB=0XFF; PORTC=0XFF; PORTD=0XFF; _delay_ms(50); for(e=128,f=1,e>=1,f<=128;e&&f;e=e/2,f=f*2)

{

PORTA&=~e;

_delay_ms(5*m);

PORTD&=~f;

}

for(g=1,h=128,g<=128,h>=16;g&&h;g=g*2,h=h/2)

{

PORTB&=~g;

_delay_ms(50);

PORTC&=~h; }}

for(n=1;n<=10;n++)

{

n;

PORTA=0XFF; PORTB=0XFF; PORTC=0X00; PORTD=0X00; _delay_ms(20);

PORTA=0X00; PORTB=0X00; PORTC=0XFF; PORTD=0XFF; _delay_ms(20);

}

}}

Step 4: Conclusion

Picture of Conclusion

connect the battery

and give the final touch.

You are ready to show your love:

turn it on!I assure it's as beautiful to look at, as simple to make.(Sorry for image's bad quality)

If you like this instructable,

please vote me.

Thank you!

Comments

saeed mahdavi asl (author)2015-11-24

Dear Sir:

Any circuit needing programing, should be offered with its HEX file, or for many novices and radio amateurs it would be useless. so please try to offer your circuits a long with its HEX files.

thanks a lot

Saeed Mahdavi Asl.

saeed mahdavi asl (author)2015-09-03

If only you had included the HEX. It would have been marvelous,

saeed mahdavi asl (author)2015-09-03

Hi Dear man:

if only you had included the HEX file too. it would have been marvelous.

About This Instructable

537views

9favorites

License:

Bio: can't say about my self it's totally depends on ur behavior
More by alok014:Gesture Controlled MouseGetting Started With ARDUINOFace Detection+recognition
Add instructable to: