Beds are hard to get out of it when you’re settled in, but lights don’t turn themselves off.
In the past, I could switch the lights off in my bed using poles to turn off the lights. But not after moving to my new apartment.
There are commercial solutions to this issue. You can change the switch out to respond to claps or install Bluetooth-enabled light bulbs. Both are expensive.
This $30 solution was much easier. A servo would switch off the lights upon receiving an IR signal. The code was programmed in C.
Another example of how simple programming and simple engineering can help you in your daily life.