Background / Motivation
This was my teams’ project for our Intro to Physical Computing midterm, where we were encouraged to use serial communication. Barak Chamo and Mai Arakida Izsak were the other team members, and contributed to this post.
After seeing Barak create his initial Fuji Diorama:
We thought it would be interesting to insert lights between the layers that could change the appearance of the scene depend on the time of day or weather. We had the idea to connect it to an api through a serial connection that would provide the current weather for the location the scene was taken, and we’d make the lights in the scene reflect the weather and time of day of the real location. This would provide a deeper connection to the real location for the observer.
For this project chose to convert Meditating Samurai, by Bacht:
We figured this diorama would be ideal because:
- It would be easy to trace vectors for laser cutting the layers.
- We could insert addressable leds between the layers and alter each layers colors independently.
- We could make the sun also behave as a moon by backlighting it and altering its color.
We cut these layers both on white paper and on colored paper, to see how the scene would look under different lighting:
We decided to go with colored papers because they would more closely resemble the original. We put 5 strips of 10 WS2812 leds each between each layer.
We used a single WS2812 neopixel to represent the sun, and diffused it with some frosted paper.
The Hardware and Code
The system was built using Arduino, WS2812 addressable leds, and a lightweight node.js app that would fetch the weather via an api and provide it via serial to the Arduino. We created a simple physical computing interface with three buttons that would:
- toggle the time of the day (sunrise, midday, sunset, nighttime)
- change weather (clear skies, cloudy, rain)
- request the current weather and time of day at Mt Fuji via serial communication
See the gist for The Arduino and Node.js code here.
When transitioning between conditions, the colors would fade to the new colors. This was done using the FastLED library’s
blend function to lerp between colors.
At nighttime, the sky would simulate stars sparkling by animating them to white or dark blue.