Giter Club home page Giter Club logo

gesturehuelight's Introduction

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

gesturehuelight's People

Contributors

hjyyjh avatar maripoforest avatar rhythm232 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gesturehuelight's Issues

cURL Bug

cURL Bug in main branch, cURL please clear response in cURL methods. @hjyyjh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.