I am not sure what it is you're asking for. Are you wanting to know if the code does what it's supposed to or whether it is a valid programming flow? To test we would need a schematic.
You might want to simplify the code some as well but that's up to you.
void toggleSrsPrll(int modeSrs, int modePrll, int delayTime) {
digitalWrite (srs, modeSrs);
digitalWrite (prll, modePrll);
delay(delayTime);
}
void loop() {
btnst = digitalRead (btn);
while (btn == HIGH) { //while the button is pressed turun
digitalWrite (srs, LOW); //the other circuits off
digitalWrite (prll, LOW);
}
do {
if (cnt >= 15)
cnt = 0;
else {
if (cnt < 3) {
Serial.println ("a");
toggleSrsPrll(HIGH, LOW, bk);
toggleSrsPrll(LOW, HIGH, bk);
cnt++;
}
else if (cnt < 6) {
Serial.println ("b");
toggleSrsPrll(HIGH, LOW, bk / 2);
toggleSrsPrll(LOW, HIGH, bk / 2);
cnt++;
}
else if (cnt < 9) {
Serial.println ("c");
toggleSrsPrll(HIGH, LOW, bk / 4);
toggleSrsPrll(LOW, HIGH, bk / 4);
cnt++;
}
else if (cnt < 15) {
Serial.println ("d");
toggleSrsPrll(HIGH, LOW, bk / 8);
toggleSrsPrll(LOW, HIGH, bk / 8);
cnt++;
}
}
Serial.println("e");
} while (btn == LOW); // while button is off
}