Gesture Controlled Interactive Desk Light

We all have seen different kinds of mood lamps & RGB light, most of them have some buttons or a remote to interact with them, but we thought of making a Gesture Controlled RGB Desk Lights which can change its colour only using a simple swipe gesture as a trigger. This is an interactive art project made using the Arduino uno board & IR array sensor. It’s a fun and easy project which can be taught to students & kids.

Let’s dive to the making portal.

Follow us on Instagram: Random stuff We Make! for more cool projects.

Step 1: Arrange the Material

All the material mentioned here is easily available in your local market as well as online stores.

  1. Arduino Uno
  2. IR sensor Array (8 sensors)
  3. WS2812b Addressable RGB LED
  4. 5V, 2A power adapter

Step 2: Introduction

This sensor is a simple array of multiple IR sensors (Proximity sensor). This array consists of 8 sensors which can give 8 different analog & digital outputs. In this project, we will use this sensor to identify the direction of motion of our hand & hence change the colours of LEDs in accordance with gestures. The Arduino board will take input from the sensor and change the colours of LEDs.

Attached here is an image of IR sensor array and the gestures associated with the code. The two simple gestures will be :

  1. Left Swipe
  2. Right Swipe

Check out the working of these gestures here :

Step 3: Making the Connections

There are few connections only, viz; (Refer to the connections from the circuit image)

IR Sensor Connections :

  1. Connect GND of IR line follower sensor to GND of Arduino.
  2. Connect VCC of IR line follower sensor to 5v of Arduino.
  3. Connect Digital Output of sensor A to Digital pin 4 of Arduino.
  4. Connect Digital Output of sensor B to Digital pin 5 of Arduino.
  5. Connect Digital Output of sensor C to Digital pin 6 of Arduino.
  6. Connect Digital Output of sensor D to Digital pin 7 of Arduino.
  7. Connect Digital Output of sensor E to Digital pin 8 of Arduino.
  8. Connect Digital Output of sensor F to Digital pin 9 of Arduino.
  9. Connect Digital Output of sensor G to Digital pin 10 of Arduino.
  10. Connect Digital Output of sensor H to Digital pin 11 of Arduino.

LED strip Connections :

  1. Connect GND of LED strip to GND Arduino.
  2. Connect 5V of LED strip to Vin of Arduino.
  3. Connect Data In of LED strip to Digital pin 3 of Arduino.

That’s all folks!

Step 4: Let’s Code It

The code attached here is complete.

Explanation :

The Code is simple, We are using one library named FAST LED to control the LED and giving it effects. Then 8 variables are declared using alphabets to store the data coming from sensors. The Number of LEDs in pixel strip is defined as 90(you can change this according to your setup) & data pin is defined as pin 3 of Arduino.

The void loop consists of 2 nested if loops which will check which of the sensors are turned on & hence glowing up/changing the colours of LEDs.

One Void Fadeall function is made to provide the Hue(Color) Changing effect.

Download the code from here & enjoy.

Follow us on Instagram: Random stuff We Make! for more cool projects.

Step 5: Some Pictures

This is how it looks.

Source: Gesture Controlled Interactive Desk Light


About The Author

Muhammad Bilal

I am a highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top