As you probably know by now, the PyPortal has quite a few built-in hardware features. In this project, we're going to take advantage of the light sensor, which allows you to have a built-in, light sensitive analog input. We're going to use that light sensor to change between two pictures on the PyPortal. If there isn't enough light hitting the sensor, then the picture will change and play an audio file; otherwise the original picture will remain displayed.
This particular instance of this project concept is based on the cult classic TV series Twin Peaks. Twin Peaks is about the mythical town of Twin Peaks in Washington State and the many mysterious, creepy and bizarre happenings there that all seem to center around Laura Palmer.
One of the classic images from Twin Peaks is in fact a physical photograph: Laura Palmer's homecoming photo, displayed in a silver metal frame. This framed photograph is displayed during the end credits of every episode of Twin Peaks and also has some featured moments in the series. This is why the picture displayed on the PyPortal when enough light is available is the same iconic homecoming photo and the housing for this project is a modified silver picture frame.
When darkness falls though, a more sinister Twin Peaks reference is revealed: the Woodsmen. The Woodsmen are a mysterious group featured in The Return season of Twin Peaks, which ran 25 years (as promised by Laura Palmer herself) after the original two seasons. The Woodsmen are very cryptic in both their actions and their words. One of their catchphrases, "Gotta light?", is played alongside their photo when darkness falls.
If you aren't into Twin Peaks though, don't worry. You can use any picture or audio files with this project concept. Let's take a look at how to get everything setup with the code and circuit.