1 / 1
1U Rack mount WOPR LEDs Enclosure — zdjęcie 1

1U Rack mount WOPR LEDs Enclosure

Zamów wydruk tego modelu

Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.

Zapisane na tym urządzeniu.

1U Rack mount WOPR LEDs Enclosure. Fits 3 4x1 8x8 LED arrays similar to https://www.amazon.com/dp/B07FFV537V

Ocena
5 / 5
Polubienia
174
Pobrania
742
Wydruki
7
Wyświetlenia
10 876
Oceny
2

Aktualizacja u źródła:

Informacje o modelu

Źródło
Printables
Kategoria
Other Gadgets
Licencja
Creative Commons — Attribution

I’ve always been deeply fascinated with the aesthetic of WOPR, the computer from War Games (1983). The steadily changing lights that allegedly represented the state of the machine are something I’ve wanted to replicate in my server rack for years. Recently I decided that if the product didn’t exist, I’d make it.

After some recon, I learned about little 8x8 LED arrays, with the MAX7219 driver. For under $10, a 1x4 array of these arrays could be had…. and you can daisy chain them together. Three of these linked in a row fit neatly into a 1U slot.

I wired them up to a Raspberry Pi Pico running MicroPython, followed a guide to get the pins in the right spot and add the basic driver and run some demos, all seemed well. The issue is that I didn’t wan this to do anything normal: I wanted to individually control each “pixel” and do my best to replicate how WOPR looked.

After some iteration, I wound up with the following functionality:

When running, it will flip a coin per column (96 of them) to decide if that column will change at all from its previous state. If it will be changed, it flips eight coins to decide what that column will look like. It then draws the image to the display. Afterwards, it flips a 4-sided coin to decide how long it will wait before moving on and repeating the loop. I think it does a great job of replicating the methodical vibes of the WOPR indicators.

Wiring guide:
https://microcontrollerslab.com/max7219-led-dot-matrix-display-raspberry-pi-pico/

LED module:
https://www.amazon.com/dp/B07FFV537V

Driver:

https://github.com/mcauser/micropython-max7219/blob/master/max7219.py

My code:

from machine import Pin, SPI
import max7219
import random
from time import sleep
spi = SPI(0,sck=Pin(2),mosi=Pin(3))
cs = Pin(5, Pin.OUT)
display = max7219.Matrix8x8(spi, cs, 12)
display.brightness(0)
while True:
   for y in range (8):
        for x in range (96):
            flip = random.randint(0, 1)
            if (flip == 0):
                flipp = random.randint(0, 1)   
                if (flipp == 0):
                    display.pixel(x,y,1)
                else:
                    display.pixel(x,y,0)
            else:
                pass
   display.show()
   timeflip = random.randint(0,3)
   if (timeflip == 0):
        sleep(1)
   elif (timeflip == 1):
        sleep(1.5)
   elif (timeflip == 2):
        sleep(2)
   else:
        sleep(0.5)

boot.py has been attached.

Tagi