// Arduino use C/C++ Programming
// C/C++ Programming is case-sensitive
const int ledPin = 12; // Pin connected to the LED (built-in LED on Arduino Uno)
const int ledVer =13;
void setup() {
Serial.begin(9600); // Initialize serial communication
pinMode(ledPin, OUTPUT); // Set LED pin as output
}
void loop() {
char userInput;
// Prompt the user for input
Serial.println("Enter a letter:");
while (!Serial.available()) {
// wait for user input
}
userInput = Serial.read(); // Read the user's input
// Check if the input is a valid letter (A-Z or a-z)
if ((userInput >= 'A' && userInput <= 'Z') || (userInput >= 'a' && userInput <= 'z')) {
digitalWrite(ledPin, HIGH); // Turn on the LED
delay(1000); // Wait for 1 second
digitalWrite(ledPin, LOW); // Turn off the LED
digitalWrite(ledVer, HIGH); // Turn on the LED
delay(1000); // Wait for 1 second
digitalWrite(ledVer, LOW); // Turn off the LED
}
}