This lamp is for anyone who needs a smart, automatic lighting system. The logic goes like this: if on auto-mode, change state based on light values, compared against a light value threshold. If it is on manual, change based on a "switch" made by moving your hand right. To turn back to auto mode, just swipe your hand left. Next is the relay module. Relays can be used to control high voltage and amperage projects. I use a relay module because it comes with easy interfaces and built in diodes for voltage protection. If you need a tutorial on how to set up a cord for a relay circuit check out my project here: https://www.hackster.io/gatoninja236/arduino-humidifier-control-2e7805
Now we can assemble it! Just plug everything in according to the diagram. It is best to place the APDS-9960 (the light and gesture sensor) in a well-lit spot so you won't trigger any false switches. Now relax knowing that your lamp will turn on at night and be off throughout the day all on its own!
Comments