In 1938 Piet Bos founded the Natural History Museum in Holten. Bos had a nationally renowned taxidermy company in Holten. In the era of emerging tourism, Mr Bos had a good sense of how he could captivate visitors. He had a unique idea at the time, namely to exhibit stuffed animals in their “own” environment through dioramas (viewing boxes). Not only the dioramas, but also display cases with prepared birds and mammals still appeal to the imagination. Over the years, the collection has grown into one of the most extensive in Europe. Son Kees Bos has given the museum a contemporary character as a painter and sculptor. The name of the museum has been changed to Natuurdiorama Holterberg. Visitors to the Sallandse Heuvelrug can learn about the history and flora and fauna of the area in the museum. The nature museum also shows animals that occur in other parts of Europe. More than 1,000 animals and birds can be viewed in eleven life-size dioramas, accompanied by accompanying sounds.
My friend Tyrone posted something he recorded from TV. It was an illusion, using rotated images.
The effect is that it seems that the card is rotating at different speeds, when pressing the s (show/unshow) key, you see the card rotating at the same speed as before.
So I wanted to try to recreate this using python. The effect is there, but a little less. What can I improve?
Mine:
Around the 30 seconds mark I disable the background, you’ll see the card rotating as before.
Original:
Better version, larger and using s key to toggle water off, to see the card rotating
<?php
// squeezebox.php
// leave playerid as is, for the default.
// change to MAC address of player to get coverart specific player
$img = file_get_contents('http://IP-LOGITECH_MEDIA_SERVER:9000/music/current/cover.jpg?player=<playerid>');
$im = imagecreatefromstring($img);
$width = imagesx($im);
$height = imagesy($im);
$newwidth = '240';
$newheight = '240';
$thumb = imagecreatetruecolor($newwidth, $newheight);
imagecopyresized($thumb, $im, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
//imagejpeg($thumb,'small.jpg'); //save image as jpg
header('Content-Type: image/jpeg');
imagejpeg($thumb);
imagedestroy($thumb);
imagedestroy($im);
?>
Arduino install:
Start IDE
Install TJpg_Decoder library
Open examples>Tjpeg_decoder>SPIFFS>SPIFFS_web_spiffs
change wifi credentials
and the url to your php script.
bool loaded_ok = getFile("https://myserver/onkyo.php", "/M81.jpg"); // Note name preceded with "/"
replace bottom part with
// while(1) yield();
delay(5000);
SPIFFS.remove("/M81.jpg");
Get image from below url. Note! .. its a static non refreshing image!
http://192.168.1.2/album_art.cgi
Note: This gives me a file which shows fine in a browser, but being a http feed you cannot embed this in a https site. Another ‘problem’ with this image is that it includes headers, rendering this a invalid jpg when processing! (remove first 3 lines programmatically) I also want to have it updated, so I could make a mjpeg streamer for this. Probably i’m going to use my reverse proxy which uses SSL offloading to access cover art over https. (Then I can push this cover image on this webblog so you guys can see what we are listing to)
Another idea is to push this to an arduino display.
Not using https?
You can embed the album art in a dashboard. This won’t refresh, but the added time code will stop caching problems.
Yesterday I got this nice led matrix I mentioned before.
I wanted to control this display using Circuit Python and a Raspberry Pico.
Pico Matrix
GP0 R1
GP1 G1
GP2 B1
GP3 R2
GP4 G2
GP5 B2
GP6 A
GP7 B
GP8 C
GP9 D
GP10 Clock
GP11 E
GP12 Latch
GP13 Output Enable
GND GND ( I did both )
I installed Circuit Python and the following libraries.
adafruit_imageload, adafruit_display_text.label (the rest was already in the uf2 firmware.) (Check this link : https://circuitpython.org/board/raspberry_pi_pico/ ) I could not install the Wifi uf2 file, then I got a out of storage space when installing the adafruit libraries.
I became interested in Conway’s “Game of Life”, in 1983. Reading a article in the Dutch Magazine Kijk.
The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970. It is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves. It is Turing complete and can simulate a universal constructor or any other Turing machine.
I found these on my server. Bad quality, I know. Scanned these many years ago.
The rules are:
Any live cell with fewer than two live neighbours dies, as if by underpopulation.
Any live cell with two or three live neighbours lives on to the next generation.
Any live cell with more than three live neighbours dies, as if by overpopulation.
Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
When playing with the Basic code as a kid, I wanted to try if it was possible to make a 3D version of this.
I came up with the following rules:
Birth : 4 alive neighbours needed
Survive : 5 or 6 neighbours
Dead : below 4 and over 6
I think there should be a BBC Acorn basic version I wrote somewhere.
Back to the display
Pico BoardGame of LifeDisplaying a imageGreetings to my friendsGame of Life starting with my Logo plus a gliderA single Gosper‘s glider gun creating gliders
Code for the glider gun
conway_data = [
b' + ',
b' + + ',
b' ++ ++ ++',
b' + + ++ ++',
b'++ + + ++ ',
b'++ + + ++ + + ',
b' + + + ',
b' + + ',
b' ++ ',
]
A few years ago, I made a little light metering sensor using a light resistor and a NodeMCU (using analog read). This would measure if a Led was turned on from my Alarm system. (I had no other way to read this state. (I also had it connected to our washing machine for a while, to read the state.)
Now I wanted to read the state of the TV set-top box. This Arcadyan hmb2260 has a green/led state LED, so measuring light is not enough. (I can only toggle the device from Home Assistant, so there is no way to know the current state!) Toggling on/off and portscanning the device gave me not another way to get the state (no extra open ports/web state pages) than using an RGB Sensor.
Flashing this with ESP Home and integrating it in HA was a breeze.
I wanted to turn the Illuminance LED also off, because the Set-top box already emits light.
Now I’m going to 3D print a holder which can be used to press the button manually when needed.
Or I could make a cool audio visualiser, like the posted WLED version
Ehh .. not posted (well I can’t post everything)
What about a game of life display? Using a web interface for inputting the start situation of the cells
Conway’s Game of Life is a cellular automaton. It consists of a grid of cells, each of which can be alive or dead. The state of each cell evolves based on simple rules: any live cell with fewer than two live neighbours dies (underpopulation), any live cell with two or three live neighbours survives, and any live cell with more than three live neighbours dies (overpopulation). Additionally, any dead cell with exactly three live neighbours becomes alive (reproduction). This simple set of rules can lead to complex patterns and behaviours.
But back to the demo …
What about a 6502 with 64×64 pixel display!
What would be needed?
6502, with rom and ram
Some IO chip, don’t know which one yet
The 64×64 pixel matrix
A sound solution (simple chip tune player)
3D printed enclosure
Using some libraries and a framework setup, maybe there is a way to make a cool and cheap demo machine
Do you have any suggestions ideas? Comment or email me!
"If something is worth doing, it's worth overdoing."