Falcon Heavy night light

Since I’m into making lights lately, I made a new one. Obviously most of the work was done by this guy on Thingiverse, but I did add a Raspberry Pi Zero with a Unicorn HAT for the fancy light effects.

Full video after the jump.

List of parts I used:

  • 3D printer: This is the most… vital one. And probably the most expensive. If you don’t have one, find a buddy who does (but who’s not me).
  • Raspberry Pi Zero (I used one without Wi-Fi, but if you buy one that does have it, you could probably program it to do even cooler stuff.): Pimoroni
  • Unicorn PHAT: Pimoroni

My files:

My code:

import time
import unicornhat as uh
import random


while True:

	palette = [

	board = [[7 for i in range(8)] for j in range(8)]
	board[random.randrange(8)][random.randrange(1)] = random.randrange(1)+6
	board[random.randrange(8)][random.randrange(2)] = random.randrange(3)+3

	for y in range(1,u_height):
	    for x in range(u_width):
	        tx = (x-1)+random.randrange(2)
	        if tx>7:
	            tx = tx-7
	        elif tx < 0:
	            tx = 7+tx
	        if board[tx][y-1] > 0:
	            board[x][y] = board[tx][y-1]-1
	            board[x][y] = 0

	for y in range(u_height):
	    for x in range(u_width):
	        (r, g, b) = palette[board[x][y]]
	        uh.set_pixel(x, y, r, g, b)