Pi Pico - Conway's Game of Life - Demonstration With Code

16406

Intro: Pi Pico - Conway's Game of Life - Demonstration With Code

You can read about the origin of this Game here:

Conway's Game of Life - Wikipedia

Coding this game has often been an early project when a programmer got access to a new display screen. I've recently taken delivery of two new screens from Pimoroni. The larger has 240 x 240 pixels on a Pico Explorer Base, while the smaller has 240 x 135 pixels on a Pico Display. Both devices are driven by the recently released Raspberry Pi Pico microcontroller coded using MicroPython.

Once running you can generate a new colony by hold button A and halt the execution of the program with the Y button.

I've included downloads for both screens.

As you can see I've based these scripts on Steve Baine's post for Pico Unicorn Pack (7 x 16 LEDs) on Pimoroni's Forum. They provide examples of the performance of the Pico with these displays.

3 Comments

You may be able to achieve something my combining the techniques in the Display tutorial here:
Pimoroni Pico Display Workout : 3 Steps - Instructables
use the predefined character as the sprite and position it with the scrolling method. Bigger sprites could be made by positioning characters together.
Have fun!
Thank you very much for these tutorials so far!

Pico with the smaller display has been my first microcontroller and it's been so much fun learning it!

I see that you are using looped display.pixel for drawing here but I'd like to know if you have any plans of showing us how would one load a sprite or two from the Pico's memory and draw them?