void setup() {
// put your setup code here, to run once:
volatile char *dirf,*dirk,*dirb;
dirf=0x30;
*dirf=0xff;
dirk=0x107;
*dirk=0xff;
dirb=0x24;
*dirb=0x00;
}
void loop() {
// put your main code here, to run repeatedly:
volatile char *outf,*outk,*inb,readInput,count=0;
outf=0x31;
outk=0x108;
inb=0x23;
while(1){
readInput=*inb;
if(readInput){
count++;
for(volatile long j=0;j<50000;j++);
}
if(count==1){
*outk=0xff;
*outf=0x06;
*outk=0x0e;
}
else if(count==2){
*outk=0xff;
*outf=0x06;
*outk=0x0e;
*outk=0xff;
*outf=0x5b;
*outk=0x0d;
}
else if(count==3){
*outk=0xff;
*outf=0x06;
*outk=0x0e;
*outk=0xff;
*outf=0x5b;
*outk=0x0d;
*outk=0xff;
*outf=0x4f;
*outk=0x0b;
}
}
// *outk=0xff;
// *outf=0x06;
// *outk=0x0e;
// *outk=0xff;
// *outf=0x5b;
// *outk=0x0d;
// *outk=0xff;
// *outf=0x4f;
// *outk=0x0b;
// *outk=0xff;
// *outf=0x66;
// *outk=0x07;
}