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:
Sun Jul 28 02:57:56 2019 +0000
Parent:
9:159df2630ad0
Child:
11:bf0065ac6e9e
Commit message:
Update RA lib

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	Mon Mar 04 12:10:47 2019 +0000
+++ b/RA8875.lib	Sun Jul 28 02:57:56 2019 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/WiredHome/code/RA8875/#f92c0f1f6db4
+http://mbed.org/users/WiredHome/code/RA8875/#c7fb7a4fb42f
--- a/main.cpp	Mon Mar 04 12:10:47 2019 +0000
+++ b/main.cpp	Sun Jul 28 02:57:56 2019 +0000
@@ -6,14 +6,14 @@
 #include "LifeRules.h"  // v3
 
 // These two defines can be enabled, or commented out
-//#define BIG_SCREEN
-//#define CAP_TOUCH
+#define BIG_SCREEN
+#define CAP_TOUCH
 #define LCD_C 16         // color - bits per pixel
 
 #ifdef CAP_TOUCH
-RA8875 lcd(p5, p6, p7, p12, NC, p9,p10,p13, "tft"); // MOSI,MISO,SCK,/ChipSelect,/reset, SDA,SCL,/IRQ, name
+RA8875 lcd(p5,p6,p7,p12,NC, p9,p10,p13, "tft"); // MOSI,MISO,SCK,/ChipSelect,/reset, SDA,SCL,/IRQ, name
 #else
-RA8875 lcd(p5, p6, p7, p12, NC, "tft");             //MOSI, MISO, SCK, /ChipSelect, /reset, name
+RA8875 lcd(p5,p6,p7,p12,NC, "tft");             //MOSI, MISO, SCK, /ChipSelect, /reset, name
 LocalFileSystem local("local");                     // access to calibration file for resistive touch.
 #endif