simple but terrible,,,,, for me

jhave_21:
hi guys,

I want to perform multitasking, I don't know if it really is easy for you but I can't even make my own sketch.

So the sketch will perform these multitasking operations:
Led1 will blink (500 milliseconds) continuosly and Led2 will turn on only if the button is pressed, and even I'm pressing the button the Led1 is still blinking?
any Ideas?
thanks

Make a subroutine that checks button press and its done. But keep in mind 13 cycles are required for an analog read. This means your program will be slowed down. You can perform analog to digital conversion with more speed less accuracy. Since you are sensing button press, you can change the speed by changing ADCSRA register of the arduino or you can avoid analog to digital by doing digital to analog conversion. Have a nice day.