int rBtn = 2;
int rLed = 3;
int stage = 1; //what will the size of the combination at the start
int i = 0;
void setup() {
// put your setup code here, to run once:
pinMode(rBtn, INPUT_PULLUP);
pinMode(rLed, OUTPUT);
Serial.begin(9600);
}
void loop() {
while(i < stage){
if(digitalRead(rBtn) == LOW){
Serial.println(); Serial.println(); Serial.println();
Serial.println(i);
Serial.println(stage);
Serial.println(" random number(s)");
i++;
delay(400);
}
}
delay(1000);
stage++;
i = 0;
Serial.println(); Serial.println();
Serial.println(stage);
delay(1000);
}