Pi Pico - Conway's Game of Life - Demonstration With Code
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
tonygo2 3 years ago
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!
tonygo2 3 years ago
SSD1306 With Raspberry Pi Pico : 6 Steps (with Pictures) - Instructables
Unfortunately here does not appear to be a suitable 'blit' instruction provided by Pimoroni.so I've not worked out how to do it on their screens yet.
Morvari 3 years ago
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?