void setup() {
DDRB=0b00111000;
DDRD=0b00000000;
PORTD=0b00110000;
PCICR=0b00000100;
PCMSK2=0b00110000;
}
void loop() {
bitWrite(PORTB,4,1);
delay(100);
bitWrite(PORTB,4,0);
delay(100);
}
ISR (PCINT2_vect)
{
if(bitRead(PIND,4)==0){
bitWrite(PORTB,3,1);
}
else if(!bitRead(PIND,4)==0){
bitWrite(PORTB,3,0);
}
if(bitRead(PIND,5)==0){
bitWrite(PORTB,5,1);
}
else if(!bitRead(PIND,5)==0){
bitWrite(PORTB,5,0);
}
}