![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
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.
Diff: main.cpp
- Revision:
- 10:f9ad09810324
- Parent:
- 9:159df2630ad0
- Child:
- 11:bf0065ac6e9e
--- 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