LED Heart

About: I am an Engineer in the field of Embedded system & Robotics.

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!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: 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

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

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!

Be the First to Share

    Recommendations

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    3 Discussions

    0
    None
    saeed mahdavi asl

    3 years ago

    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.