From: Martin Mares Date: Sun, 24 Mar 2024 16:28:05 +0000 (+0100) Subject: neopixel-square: Yet more GoL patterns X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=cf4cec7e3a92d739c8a0e93ba8f171cb9aae2849;p=home-hw.git neopixel-square: Yet more GoL patterns --- diff --git a/test-neopixel-square/main.c b/test-neopixel-square/main.c index 05f44b2..b1e8098 100644 --- a/test-neopixel-square/main.c +++ b/test-neopixel-square/main.c @@ -163,7 +163,7 @@ byte lpred[LN+2][LN+2]; static void life_init(void) { -#if 1 +#if 0 // The R pentomino life[3][4] = 1; life[3][5] = 1; @@ -182,6 +182,24 @@ static void life_init(void) life[2][3] = 1; life[3][2] = 1; life[3][3] = 1; +#elif 1 + // Octagon (period 5 oscillator) + life[1][4] = 1; + life[1][5] = 1; + life[2][3] = 1; + life[2][6] = 1; + life[3][2] = 1; + life[3][7] = 1; + life[4][1] = 1; + life[4][8] = 1; + life[5][1] = 1; + life[5][8] = 1; + life[6][2] = 1; + life[6][7] = 1; + life[7][3] = 1; + life[7][6] = 1; + life[8][4] = 1; + life[8][5] = 1; #endif } @@ -247,7 +265,7 @@ int main(void) debug_led(0); // neopixel_set(NPIX_NUM_LEDS-1, 0, 0, 0x7f); delay_ms(500); - if (lsteps++ < 30) + if (lsteps++ < 3000) life_step(); else { life_init();