Introduction: Saving the Boring Life With a Smart Lamp
We all hope that we can live more comfortably at home. Whether you often feel uncomfortable because the dimming of household lamps is not smart enough? Or whether you feel monotonous because the function of household lamp?This lamp can solve your trouble.
The project can produce two modes: normal mode and entertainment mode. In normal mode, the lamp will adjust the light through the light sensor and human thermal recognition to achieve the control of light, which can be used for study and work. And when you feel tired from work or study, you can turn on the music player. This lamp can also convert you into entertainment mode.In this mode,the lamp can recongize the beat and flicker with the rhythm。
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Circuit Connection
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.
Step 2: 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.
Step 3: To 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.