//these are the variables -->
int myNumber;
String msg = "Enter times you want your LED to blink: ";
String msg2 = "LED blinking, blinking this many times --> : ";
int delayT=300;
void setup() { //setup for a this part in the code to run once
  Serial.begin(9600);
  pinMode(2, OUTPUT);
}
void loop() { //loop is for runing a part over and over
  Serial.println(msg);
  while (Serial.available() == 0) {
  }
  //reads what you put in the serial monitor
  myNumber = Serial.parseInt();
  while(Serial.available() > 0) {
    Serial.read();
  }
  Serial.print(msg2);
  Serial.println(myNumber);
  for (int i = 0; i < myNumber; i++) { //makes LED blink that
    digitalWrite(2, HIGH);//many times
    delay(delayT);
    digitalWrite(2, LOW);
    delay(delayT);
  } 
  Serial.println("done!");
  Serial.println("done!");
  Serial.println("done!");
  Serial.println("done!");
  delay(2000);
}
//connect LED to pin D2 with a 330 ohm resistor and then compile
//the code, also make sure to use a arduino nano if you do not
//have a nano still use the code just make sure to edit parts that
//need to be edited for other boards :)