A word "kagedourou" (in Japanese, "影灯籠", "回り灯籠": revolving lantern, or "走馬灯") is a kind of lantern with a spinning wheel for casting moving silhouettes. Though the silhouettes moves as if they are breathed life, there is a limitation from their static shape. I wonder if it can be more lifelike as a ghost (joke intended) told in Kaidan stories. That's where this project came from.
Details
Prototype 1: Good old Bad Apple! as a test sample
Kuniyoshi Utagawa, ''The Ghost in the Lantern'', 1852. 9.75" by 14" (From Wikipedia)
So, here is a prototype-1, made by sacrificing my year-end holidays. I hope it makes some laughs on its finishing which is comparable to 4th-grade-homework-crafts-thing. (I admit it's due to 1. my gibberish hands 2. my old Kossel k800 FDM printer. But instead of learning hand crafts and replacing k800 with a new SLA printer, I would try online printing services such as JLCPCB or FusionPCB. HP Jet Fusion 4200 with Nylon PA12? What a tech xxxx.)
Internally this prototype-1 uses the following components:
5.9 inch 1920x1080 LCD (Sharp LS059T1SX01) with HDMI driver
# Install yt-dlp with pipx
$ sudo apt install -y python3-pip python3-venv mpv
$ python3 -m pip install pipx
$ echo 'export PATH=$PATH:~/.local/bin' >> .zshrc
$ source .zshrc
$ pipx install yt-dlp
# A workaround for a little bit outdated mpv (v0.32.0-1ubuntu1)
$ ln -sf ~/.local/bin/yt-dlp ~/.local/bin/youtube-dl
# Bad apple!
$ export DISPLAY=:0
$ mpv -fs --panscan=1 www.youtube.com/watch\?v\=on2MUzhuVMw
To use the WS2812B ring, use the SPI bus and some Python scripts.
# Enable the SPI bus
$ sudo vi /boot/armbianEnv.txt
...
overlays=gpio-regulator-1.3v spi-spidev usbhost2 usbhost3
param_spidev_spi_bus=1
$ sudo reboot now
$ ls /dev/spidev1.0
# Install the required dependencies
# You may want to use poetry or pipenv
$ sudo apt install python3-dev
$ sudo python3 -m pip install spidev
$ wget https://raw.githubusercontent.com/likeablob/openvino-opencv-docker/master/demo-face-detection-ws2812/ws2812b.py
$ vi test.py # See the following snippet
$ sudo python3 test.py
#! /usr/bin/env python3
from ws2812b import WS2812B
led = WS2812B(12, spi_bus=(1,0))
led.off()
led.show([[250, 250, 200] for _ in range(12)])
Oh, don't forget to wire the ring to the board. WS2812's DIN is connected to OPi's PA15 (SPI1_MOSI).
Lessons learned;
The WS2812B ring roughly placed at the bottom of the frame lights the thing perfectly.