Snehilsv
Published © GPL3+

Smart_VLC media player

Here's a small but unique idea to make your VLC media player a smart one. It operates on hand-gesture.

BeginnerFull instructions provided478
Smart_VLC media player

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Story

Read more

Code

Code of python program used in this

Python
click on it/ copy paste the link on browser
import serial #Serial imported for Serial Communication
import time   #Required to use delay functions
import pyautogui


ArduinoSerial = serial.Serial('com3',9600) #Create Serial port object called arduinoSerialData
time.sleep(2) #wait for 2 seconds for the communication to get established

while 1:
    distance = int(ArduinoSerial.readline()) #read the serial data and print it as line
    
    if (distance<5):
        print("Vdown")
        i=8
        while(i>0):
            pyautogui.hotkey('ctrl', 'down')
            i=i-1
        
        
    elif (5<distance<12         ):
        print("Play/Pause")
        pyautogui.typewrite(['space'], 0.2)

    
    elif (9<distance<20):
        print("Vup")
        i=8
        while(i>0):
            pyautogui.hotkey('ctr l', 'up')
            i=i-1
        
    else:
        print('Nothing') 

Credits

Snehilsv

Snehilsv

0 projects • 0 followers

Comments