We all hope that we can live more comfortably at home.Whether you often feel uncomfortable because the light adjustment of the household lamp is not smart enough?Or whether you feel monotonous because of the single function of the household lamps. This lamp may solve your troubles.
The project can produce two modes: normal mode and entertainment mode. In the case of normal mode, this lamp will adjust the light through light sensor and human thermal recognition to achieve the control of light, which can be used in study and work. And when you are tired from study or work, you can turn on your music player.And this desk lamp will also convert you into entertainment mode, it becomes a music rhythm lamp, can carry on the light rhythm to the beat.
The circuit connection is relatively simple, you can use arduino and seeed's grove expansion board, that can simply connect to seeed's grove series sensors.
In addition, this production project, loudness sensor is connected to A0 interface, light sensor is connected to A12 interface, PIR sensor is connected to D8 interface, LED Flexi-Strip is connected to D6 interface.
Write Code(the Key Step)
The code is mainly divided into two modules.One module is normal mode, the other module is entertainment mode.The code changes the mode by assigning mode values.
In normal mode, the LED switch is mainly controlled by the cooperation between the light sensor and the PIR sensor. The point is that the PIR sensor needs to be coded to make it more accurate.
In the entertainment mode, the external sound is recognized by the loudness sensor, and the LED is presented in different states by the algorithm. Here is the source code.
Encapsulate and Produce a Finished Demo
In this step, you may need to understand the use of the following 3D printers. Then you can print out the shape you want. After the package is completed, your work is finished.