So, we finally have a working prototype of the lamp.
We have installed a base, a led lamp, 2 servos, a motion sensor, a noise sensor, and 3 axys accelerometer and an audio accesory capable of recording and playback of 4 different sounds (thanks to seeedstudio.com).
The working logic of the lamp is the following:
If Noise is detected:
If motion is detected:
If a change of hight is detected (with the 3 axys):
I have many changes to make, a base lamp (i had one, but i burned all the leds on it as a mistake), also add an LCD 16×2 display, separate the power source for the servos, and many other ideas, but as a first versino of the lamp, i think it´s getting there.
Now it´s time to clean the code that is a mess!!!