const int LED=10; const int Button=12; char blinksInput; int intBlinks; void setup() { Serial.begin(9600); pinMode(LED, OUTPUT); pinMode(Button, INPUT); } void loop() { // send data only when you receive data: if (Serial.available() > 0) { Serial.println("Enter a number (1-9): "); blinksInput = Serial.read(); // enter # of blinks Serial.write(blinksInput); // read back # of blinks if (blinksInput >= '0' && blinksInput <= '9') { intBlinks = blinksInput - '0'; // convert user input to integer } } if (digitalRead(Button)==HIGH){ for (int i=0; i