Saving the Boring Life With a Smart Lamp

by Ken_xie in Circuits > Arduino

274 Views, 3 Favorites, 0 Comments

Saving the Boring Life With a Smart Lamp

p1.jpg
demo
demo1.jpg
demo2.jpg

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。

Supplies

Circuit Connection

微信图片_20200109104252.jpg
1.jpg

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)

Arduino IDE 2020 01 09 11 04 36

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.

Downloads

To Encapsulate and Produce a Finished Demo

demo1.jpg
p1.jpg

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.