Halloween 2022: Tracking eyeball
It's been a while! But I want to start adding projects to this blog again, starting with my Halloween project for 2022. The idea is to have a TV in the front window facing out with either a motion sensor or a camera detecting people walking past. On the TV an eyeball will open when it sees someone, and then the iris will move following them as they walk past my house!
All the code is on my public github: https://lorraine.mcunderwood.org/halloween-2022-tracking-eyeball/
Stage 1: Make the iris move
14/10/2022 21:00, Stage 1: Remember how to use pygame. I've created a pygame program with the eyeball and iris sprites. The iris reacts to keyboard commands. The code is stage1_keyboardirish.py
And a video on twitter of it working:
Stage 2: Blink
It's almost 1am and I've got the blink working! I downloaded PhotoShop onto a new laptop in order to make my images transparent. The blink involved adding another sprite for the eyelids to come down over the iris and changing everything to alpha. The code is stage2_blink.py on GitHub.
Video: https://twitter.com/LMcUnderwood/status/1581069758241251329
What I want is for it to go in reverse really... the closed eye to open and watch people. But that's a job for another day