#include "hardware_dependent.h"
void setup() {
// put your setup code here, to run once:
init_port();
}
void loop() {
// put your main code here, to run repeatedly:
volatile int x;
volatile int y;
volatile long i;
x=input();
if((x&0x02)==0x02) //press 1st switch
{
while(1)
{
x=input();
if((x&0x10)==0x10) //press 4th switch
{
y=0b10000000; // Glow 8th LED
output(y);
//for (i=0;i<600000;i++);
//y=0b00000000; //OFF 7th LED
//output(y);
break;
}
}
}
x=input();
if((x&0x10)==0x10) //press 4th switch
{
while(1)
{
x=input();
if((x&0x80)==0x80) //press 7th switch
{
y=0b00000000; //OFF 7th LED
output(y);
break;
}
}
}
}