Setup and context
A few months ago, I decided to purchase and install a spotlight on my desktop. I did this to improve the video quality during meetings and calls with friends.
Aditonally, I connected this spotlight to a smart plug/switch so it can be turn on and off with my phone.
Has ilustrated in the following image, I have a spotlight connected with a smart switch and an external camera on top of my monitor.
After the installation of this light, the difference is remarkable.
The issue
I keep forgetting to turn on that light over and over, having to get my phone and turn it on is not complicated, but it's something I keep forgeting to do.
This solution
I decided to build this project, a system that checks for camera usage on my compter and a controller to turn on and off the spotlight.
The resulting main function (using addtional components) is the following:
func main() {
for {
cameraStatus := checkCameraStatus()
_ = TurnSpotlightTo(cameraStatus)
time.Sleep(1 * time.Second)
}
}
Live demo
