This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reg [3:0] d0; | |
reg [3:0] d1; | |
always @(posedge clk) | |
begin | |
d0 <= ((d0 & 9) == 9) ? 4'b0 : d0 + 1; | |
if ((d0 & 9) == 9) d1 <= d1 + 1; | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USER_LIB_PATH = lib | |
OBJDIR = bin | |
TARGET = $(firstword $(wildcard *.ino)) | |
BOARD_TAG ?= arduino_zero_native | |
FQBN ?= adafruit:samd:adafruit_feather_m0 | |
UPLOAD_PORT ?= $(wildcard /dev/tty.usbmodem*) | |
# just to trigger changes to target bin | |
CSRC := $(shell find . -type f -name '*.c') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Game of Life async task that updates passed PIL Image with generations | |
loosely based on https://codereview.stackexchange.com/questions/125292/conways-game-of-life-in-python-saving-to-an-image | |
but fixes the critical bug which runs the frame update loop on a transient grid resulting in wrong behaviour - I don't have enough points to post fix! | |
Copied from part of a bigger project I'm working on, this can still be run with the python flipdot module imported using a script. | |
""" | |
import random, asyncio | |
from PIL import Image |
OlderNewer