void playStun() {

    int8_t j = 0;
    int8_t i;

    while (j < 10) {

        for (i = 0; i < 24; i++) {

            if(i % 2) {
                colorRed();
            } else {
                colorYellow();
            }
        }

        delay_25ms_n_times(11);

        for (i = 0; i < 24; i++) {

            if(i % 2) {
                colorYellow();
            } else {
                colorRed();
            }
        }

        delay_25ms_n_times(11);

        j++;
    }
}
void playStunSelf() {

    int8_t i;
    for (i = 0; i < 24; i++) {
        colorYellow();
    }

    __delay_ms (25);
    __delay_ms (25);
    __delay_ms (25);
    __delay_ms (25);
    __delay_ms (25);
    __delay_ms (25);
    __delay_ms (25);
    __delay_ms (25);
    __delay_ms (25);
    __delay_ms (25);
    clearPattern();
    __delay_ms (25);
    __delay_ms (25);
    __delay_ms (25);
    __delay_ms (25);
    __delay_ms (25);
    __delay_ms (25);
    __delay_ms (25);
    __delay_ms (25);
    __delay_ms (25);
    __delay_ms (25);
}
void playTestPassed() {
    int i;
    for ( i = 0; i < 6; i++) {
        colorRed();
    }
    for (i = 0; i < 6; i++) {
        colorYellow();
    }
    for (i = 0; i < 6; i++) {
        colorGreen();
    }
    for (i = 0; i < 6; i++) {
        colorBlue();
    }
    delay_25ms_n_times(200);

}
Ejemplo n.º 4
0
void NeoPixelEffects::randomColor() {
    i++;
    switch ((i / 20) % 4) {
    case 0:
        colorBlue();
        break;
    case 1:
        colorRed();
        break;
    case 2:
        colorGreen();
        break;
    case 3:
        colorYellow();
        break;
    }
}