Day 11: Day- and nightlight
Behind today’s door is a 10-kohm resistor, but we don’t need it yet today. Instead, the set-up from yesterday’s test works today as well. In this project, you’ll build a day-night lamp that changes colours at specific times. Thus you can have a bright light shining during the day, while at night only a dim red serves as emergency lighting for a bit of orientation.
When you’ve transferred the Blynk interface via QR code and downloaded today’s programme, changed it and uploaded it to the controller, you can already get started. On the Blynk interface, you see two ZeRGBa elements, which are labelled “DayLight” and “NightLight.” When you switch to day or night mode with the outside buttons below the ZeRGBa elements, the corresponding colour of the element is shown. But you can also automate the switch between day and night mode. To do this, tap one of the two timer elements directly below the colour selection elements. Here, while the interface is not started, you can select a time at which the mode should be switched. All you have to adjust is the start time. The same applies for the other timer element. At the selected time, the mode switches over, and the LED changes from the day colour to the night colour or vice versa. You don’t even have to have the app open at those times. The Blynk server regulates the switch-over automatically.