/*
 * ledvilkku.c
 *
 * Author : Eikka A
 * Based on Dorina Rajanen code
 */ 

#define F_CPU 20000000UL  //20 MHz
#include <avr/io.h>
#include <util/delay.h>

int main(void)
{
    DDRB = (1 << PB2);   //set the pin PA7 to be the output/
	
    while (1) {

	    // short flash 
	    PORTB = (1 << PB2); // set PB2 high
	    _delay_ms(20);     // 0.02s the led is on 
	    PORTB = (0 << PB2);  // set PB2 low
	    _delay_ms(20);     // 0.02s the led is off 

	    // long flash
	     PORTB = (1 << PB2);	// set PB2 high
	    _delay_ms(500);		// 0.5s led is on 
	     PORTB = (0 << PB2);	// set PB2 low
	    _delay_ms(500);		// 0.5s led if off
		
	}
}