The SM-1 Project Part 5 & 6: Assembling and testing the #ikea #robot lamp #arduino

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:

  • Turn on lamp
  • Play audio#3 (i´m trying to sleep here!)
  • Make a sweep left – right – left movement witht he lamp servo (as a negative head movement).
  • Rest servos on 90 degreees
  • Turn off lamp

If motion is detected:

  • Turn on lamp
  • Move to the left side (base servo and lamp servo).
  • Play audio#2 (are you sarah connor?)
  • Move to the right side (both servos also)
  • Play audio#2 (are you sarah connor?)
  • Return to  rest position (90 degrees on servos)
  • Turn off lamp

If a change of hight is detected (with the 3 axys):

  • Turn Lamp on
  • Move to left
  • Play sound#4 (Get me down!)
  • Back to rest position (90 degrees)
  • Turn lamp off

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!!!


Related Posts


  1. Pingback: oyun oyna

Comments are closed.