//my first LED on off program with two switches 18 - 02 -22
void setup() {
// put your setup code here, to run once:
volatile long i,j,x,count=0;
volatile char *dirf,*dirk;
volatile char *outf,*ink;
dirf = 0x30; dirk = 0x107;
outf = 0x31; ink = 0x106;
*dirf = 0xff; *dirk = 0x00;
while(1)
{
x = *ink;
if((x & 0x01) == 0x01)
{
*outf = 0xff;
for(j=1;j<10000;j++);
}
if((x & 0x02)== 0x02)
{
*outf = 0x00;
//for(i=0;i<100000;i++);
}
//*outf = 0x00;
//for(j=0;j<10000000;j++);
}
}
void loop() {
// put your main code here, to run repeatedly:
}