#include"setup.h"
void setup() {
// put your setup code here, to run once:
dir();
volatile char *outf,*inD,*outk;
volatile long i,j,x,y;
//volatile char A[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
outf=0x31;
outk=0x108;
inD=0x29;
while(1){
for(i=0;i<4;i++){
*outk=1<<i;
x=*inD;
if(*inD!=0){
y=1<<i;
if(y==0x01 && x==0x01){
*outf=0x77;
}
if(y==0x01 && x==0x02){
*outf=0x4f;
}
if(y==0x01 && x==0x04){
*outf=0x5b;
}
if(y==0x01 && x==0x08){
*outf=0x06;
}
for(j=0;j<1000000;j++);
*outf=0;
}
}
}
}
void loop() {
// put your main code here, to run repeatedly:
}