void setup() {
volatile char *dirf,*dirk,*outf,*ink, x;
dirf=(char*)0x30; dirk=(char*)0x107;
outf=(char*)0x31; ink=(char*)0x106;
*dirf=0x01; *dirk=0x00;
while(1){
x=*ink;
if((x & 0x01)==0x01){
*outf=0x01;
}
else{
*outf=0x00;
}
}
}
void loop() {
// put your main code here, to run repeatedly:
}