/* * main.c * * Created on: 10/gen/2014 * Author: topicchi */ #define F_CPU 1000000L #include #include #define MIN 125 #define MAX 250 int main (void) { /*unsigned int loops; //Port D pins as input, Pull-Up on all Inputs (0xFF) //Pushbuttons to GND on D0, D1, D2 and D3 DDRD=0x00; PORTD=0xFF; // Set PORTB1 pin as output // LED on B0 // Servo on OC1A - PB3 DDRB=0xFF; //TCCR1A = (1<MAX){ OCR1A =MAX; } loop_until_bit_is_set(PIND, 0); } if(bit_is_clear(PIND, 1)) { //decease duty cycle OCR1A -=10; if (OCR1A