snehiludrhj
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 provided4,068
Smart_VLC media player

Things used in this project

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

snehiludrhj

snehiludrhj

3 projects • 3 followers

Comments