void setup()
{
// put your setup code here, to run once:
volatile char *dirf,*dirk;
dirf = 0x30; dirk = 0x107;
*dirf = 0xff; *dirk = 0x00;
}
void loop()
{
volatile char *outf,*ink,x,y;
volatile long i;
outf= 0x31; ink= 0x106;
{
x = *ink;
//y=0x00;
if(x)
{
for(y=-2; y<8; y+=2)
{
*outf = (1 <<y);
for (i = 0; i <100000; i++);
}
}
else
*outf= 0x00;
}
}