// Pin where the LED is connected
const int ledPin = 13;
void setup() {
// Initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// Start the serial communication at 9600 baud rate:
Serial.begin(9600);
}
void loop() {
// Blink the LED for the received number of times
for (int i = 0; i < 10; i++) {
digitalWrite(ledPin, HIGH); // Turn LED on
Serial.println("LED is ON");
delay(1000); // Wait for 1000 milliseconds
digitalWrite(ledPin, LOW);
Serial.println("LED is OFF"); // Turn LED off
delay(1000); // Wait for 1000 milliseconds
}
}