Conway's game of life applied to the mbed and an RA8875 LCD.

Dependencies:   LifeRules mbed RA8875

Inspired by a forum discussion on the mbed site, this version was scaled to support up to a 480x272 display - in a monochrome mode, or at a lower resolution in color (the color shows simple animation for birthing and dying cells).

Leveraging the LifeRules class, the game can be easily adapted to other displays - whether monochrome or color.

By default, this version allocates memory from the Ethernet ram banks, so avoids the memory limitations of some designs.

It should be simple to adapt it to any display - color or b&w, high or low resolution.

Files at this revision

API Documentation at this revision

Comitter:
WiredHome
Date:
Sat Mar 28 15:31:05 2020 +0000
Parent:
10:f9ad09810324
Child:
12:a4c837258a57
Commit message:
Breaking change update to RA8875 Library. Improved APIs, Improved Portrait Mode, Code Cleanup.

Changed in this revision

RA8875.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/RA8875.lib	Sun Jul 28 02:57:56 2019 +0000
+++ b/RA8875.lib	Sat Mar 28 15:31:05 2020 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/WiredHome/code/RA8875/#c7fb7a4fb42f
+http://mbed.org/users/WiredHome/code/RA8875/#fb06805f447f
--- a/main.cpp	Sun Jul 28 02:57:56 2019 +0000
+++ b/main.cpp	Sat Mar 28 15:31:05 2020 +0000
@@ -96,7 +96,7 @@
 
 void ScreenUpdate()
 {
-    lcd.window(LIFE_OFFSET_X, LIFE_OFFSET_Y, LIFE_W * LIFE_Z, LIFE_H * LIFE_Z);
+    lcd.SetWindow(LIFE_OFFSET_X, LIFE_OFFSET_Y, LIFE_W * LIFE_Z, LIFE_H * LIFE_Z);
     lcd.SetGraphicsCursor(LIFE_OFFSET_X+1, LIFE_OFFSET_Y+1);
     pc.printf("window(%d,%d, %d,%d)\r\n", LIFE_OFFSET_X, LIFE_OFFSET_Y, LIFE_W * LIFE_Z, LIFE_H * LIFE_Z);
     lcd._StartGraphicsStream();
@@ -130,7 +130,7 @@
         }
     }
     lcd._EndGraphicsStream();
-    lcd.WindowMax();
+    lcd.SetWindow();
 }
 
 int GetScreenCapture(void)