Skip to content

A Philips Hue realtime Control method, MLX90640 to recognize gesture as control signal. Also comes with seperated MLX90640 driver and Hue controller.

License

Notifications You must be signed in to change notification settings

Maripoforest/GestureHueLight

Repository files navigation

GestureHueLight



Youtube     Bilibili     Twitter

build status

Introduction

During the COVID crisis, people find it more important than ever to control their office facilities without physical touch. The touchless control should be what we pursue in the future. Although we already have sound-controlled or simple IR-controlled light switches, it is not likely to change the brightness of the object light bulb with them. In this case, a camera based gesture control switch came up in our mind. It has to be simple to use, flexible enough to change the room brightness, and most important, touchless.

Project Flowchart

Hareware

Prerequistes

IMPORTANT

  1. This project has dependencies on cURL. To build cURL, we need the OPENSSL developer kit and curl lib:
sudo apt-get install libssl-dev libcurl4-openssl-dev
sudo apt install curl
  1. To use the I2C bus, make sure the linux I2C dev library is installed:
sudo apt-get install libi2c-dev
  1. To use the Qt lib, make sure ALL Qt dependencies have been installed:
sudo apt-get install qtdeclarative5-dev-tools libqwt-qt5-dev qtmultimedia5-dev qtbase5-dev
  1. To enable the tests, remember you have BOOST lib installed:
sudo apt install build-essential libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev

First things first: Build the program:

mkdir build && cd build
cmake ..
make

1. Unit Tests

make test

2. Hue light bulb brightness control: How to use

If you are new user to Hue, this command will automatically set the light bulb ready for you, you just need press the physicall hue button:

./Hue new

Then press the Hue Bridge button, you will get the json reply, following is an example:

[{"success":{"username":"HmAE6GByMxd1-3Lufz77SJUTJhRgIEFQhvUkEa3E"}}]

The IP and username are stored in log.txt, you can just go to the last step to adjust the brightness.

If you want to modify your static IP or username, you can:

./Hue user HmAE6GByMxd1-3Lufz77SJUTJhRgIEFQhvUkEa3E
./Hue ip 192.168.0.112

You can also do:

./Hue ip 192.168.0.112 user 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

Or just modify the log.txt:

192.168.0.100 <Your Bridge IP here>
S7BnUlaWvwAs6dZgYErkLO8GAWdRHTdTGi1wxwL0 <Your username here>

to modify both IP and user mannually.

After set IP and username, adjust the brightness like this:

./Hue 200

200 is brightness, integer, from 0-255, 0 means off.

3. MLX90640 main program: How to use:

sudo ./main

Sequence diagram

References

Sensor Github Page.

Sensor Datasheet.

The Hue developer page.

The cURL Offical Page

Command line tool and library for transferring data with URLs. (since 1998)

Authors

Xiangmin Xu
Haiyang You
Jiyuan He
Yilin Zhong

About

A Philips Hue realtime Control method, MLX90640 to recognize gesture as control signal. Also comes with seperated MLX90640 driver and Hue controller.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published