int button;
void setup(){
DDRA=0xFF;
DDRJ=0x00;
}
void loop() {
button = PINJ & 0x01 ;
if(button == 0x01){
PORTA |= 0x01;
}
else{
PORTA |= 0x02;
}
PORTJ = 0x00;
PORTA = 0x00;
}
int button;
void setup(){
DDRA=0xFF;
DDRJ=0x00;
}
void loop() {
button = PINJ & 0x01 ;
if(button == 0x01){
PORTA |= 0x01;
}
else{
PORTA |= 0x02;
}
PORTJ = 0x00;
PORTA = 0x00;
}