// Enrico William A. Sihotang_A022008
int a, y;
int led=6;
void setup()
{
Serial.begin(9600);
pinMode(led,OUTPUT);
Serial.println("LED berkedip");
Serial.print("kedipan : ");
}
void loop()
{
while(Serial.available()==0)
{}
y=Serial.read()-'0';
Serial.println(y);
for (a=1; a<=y; a++)
{
digitalWrite(led, HIGH);
delay(500);
digitalWrite(led, LOW);
delay(500);
}
y=0;
Serial.print("kedipan : ");
Serial.flush();
}