for(unsigned int x = 1; x < 90; x++){
OCR1A = x;
OCR1B = OCR1A-1;
delay (map(analogRead(3),0,1023,0,30));
}
}
ISR(TIMER1_OVF_vect){ // Timer1 overflow interrupt service routine
PORTB |= _BV(PORTB2); // Turn LED (pin 13) on
}
ISR(TIMER1_COMPA_vect){ // Timer1 compare interrupt service routine
PORTB &= ~_BV(PORTB2); // Turn LED off
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น