10개만 출력

arduino_2016. 3. 26. 14:40

int result = 0;

void setup() {

  // put your setup code here, to run once:

  Serial.begin(9600);

  randomSeed(analogRead(0));

}


void loop() {

  // put your main code here, to run repeatedly:

  

  if(result == 0){

   int i;

   for(i=1; i<=10; i++){

    delay(1000);

    Serial.println( random(66,100));

   }

   result+=1;

  }

}