Use Gestures to Control YouTube Playback With Arduino
by memoryleakyu in Circuits > Arduino
463 Views, 3 Favorites, 0 Comments
Use Gestures to Control YouTube Playback With Arduino
Story
YouTube only allow you to fastforward 5 seconds everytime you click the right button. So I decided to use Arduino and python to make a controller to help me fastforward 20 seconds everytime I wava my hand.
Supplies
Seeeduino V4.2 [Buy Here](https://www.seeedstudio.com/Seeeduino-V4-2-p-2517....)
Seeed Grove - Human Presence Sensor [Buy Here](https://www.seeedstudio.com/Grove-Human-Presence-S...)
Python [Download Here](https://www.python.org/)
Arduino IDE [Download Here](https://www.arduino.cc/en/Main/Software)
Hardware Connection
Connect your Arduino with your computer and the IR sensor. The IR sensor should be plugged into an I2C port.
Download and Install Arduino Library
Download the [Grove_Human_Presence_Sensor Library](https://github.com/Seeed-Studio/Grove_Human_Presence_Sensor) from Github. Then include it into your Arduino library. You can refer to [How to install library](http://wiki.seeedstudio.com/How_to_install_Arduino_Library/) to install library for your Arduino.
Arduino Code
Copy and paste the Arduino code below into your Arduino IDE. Then compile and upload it into your Arduino board.
Python Code
Copy and paste the python code below into your python editor. Remember to install the pyserial and pynput library. If you don’t know how to do it. Just open your terminal and type 'pip install pyserial' and 'pip install pynput'.
Enjoy the Controller
Execute the python file and play with your own gesture controller!