// int led=11;
// int button=2;
// int count=0;
// void setup()
// {
// pinMode(led, OUTPUT);
// pinMode(button, INPUT_PULLUP);
// }
// void loop()
// {
// ScanKey();
// switch(count){
// case 0:
// {
// analogWrite(led,0);
// }
// break;
// case 1:
// {
// analogWrite(led,75);
// }
// break;
// case 2:
// {
// analogWrite(led,255);
// }
// break;
// default:
// {
// count=0;
// }
// }
// }
// void ScanKey(){
// if(digitalRead(button)==HIGH){
// delay(10);
// if(digitalRead(button)==HIGH){
// count++;
// while(digitalRead(button)==HIGH);
// }
// }
// }
int yellow_led=13;
int blue_led=12;
int rad_led=11;
int yellow_button=2;
int blue_button=3;
int rad_button=4;
int rest_button=5;
bool rad;
bool yellow;
bool bule;
int setup()
{
int rad_led=11;
while(rad_led<=13){
pinMode(rad_led, OUTPUT);
rad_led=rad_led+1;
}
int yellow_button=2;
while(yellow_button<=5){
pinMode(yellow_button, INPUT_PULLUP);
yellow_button=yellow_button+1;
}
}
int loop(){
}
void clear_led()
{
digitalWrite(redled,LOW);
digitalWrite(greenled,LOW);
digitalWrite(yellowled,LOW);
}
void rad(){
rad=digitalRead(red_button);
while(!rad){
digitalWrite(rad_led, HIGH);
digitalWrite(yellow_led, LOW);
digitalWrite(bule, LOW);
}
clear_led();
}
void yellow(){
yellow=digitalRead(yellow_button);
while(!rad){
digitalWrite(rad_led, LOW);
digitalWrite(yellow_led, HIGH);
digitalWrite(bule, LOW);
}
clear_led();
}
void bule(){
bule=digitalRead(bule_button);
while(!rad){
digitalWrite(rad_led, LOW);
digitalWrite(yellow_led, LOW);
digitalWrite(bule, HIGH);
}
clear_led();
}
void rest(){
}