char day = 'A';
int Led_Pin = 2;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
// Switch code structure.
switch (day){
case 1:
// Code to be executed if expression equals case 1
break;
case 'A':
// Code to be executed if expresson equals case 2
digitalWrite(Led_Pin, HIGH);
Serial.println("The bulb lights");
delay(1000);
digitalWrite(Led_Pin, LOW);
Serial.println("Bulb does not light");
delay(1000);
break;
case 3:
// Code to be executed if expression equals case 3
break;
default:
// Code to be executed if expression doesn't match any case
break;
}
}