We want to build on our day/night cycle with some extra atmospheric effects – thunder and lightning! The code here will cover both triggering lightning based on some settings on our themes and also the design of the lightning to make things feel natural.
The code I’ve written goes from a bright, sunny day into a rich, red sunset before moving to a clear, moonlit night – not what we probably want for a damp, dirty alleyway full of suspect looking shops!
However, before I go deleting things I’ll most likely use this code in another project where I do want a bright-and-breezy lighting scheme, maybe this is an opportunity to restructure the code to support multiple themes?
This part of the process will not only build out some cool lighting effects but will help to create a backbone for the rest of the code project. I want to build something flexible that means, with a little adjusting, things like exact colour selections, timings, etc. can be set without any major code changes. This work will also define the lighting system “clock” – the loop that will run continually to simulate the different times of day.
Now I’m getting to grips with my Arduino I need to figure how to expand the 15 onboard PWM pins so that I can control more than 5 LEDs.
My list of requirements gives me in excess of 10 LEDs that will need connecting to the Arduino so I’m going to have to use the shift registers to expand things a little.
We’ve recently renovated our garage into a second living space (a bit more dedicated to the adults of the house) which as well as providing a more dedicated work-from-home space, will also give my wife somewhere nice and comfy to relax and read. The furniture is gradually arriving and next on the shopping list is a bookcase to house her collection of books.
Wanting to make things a little more special, I’m planning a bookshelf diorama (book nook) to sit alongside her Harry Potter books. There’s loads of things I need to learn to get this put together but I’m keen to add some flair with some interesting lighting.