loading
6Comments

Tell us about yourself!

Complete Your Profile
  • shramik4954 commented on ThothLoki's instructable Play Video With Python and GPIO6 days ago
    Play Video With Python and GPIO

    sir, next things which i had done is .the python script:import sysimport osfrom subprocess import Popenimport serialmovie1 = ("/home/pi/sss5/vid1.mp4")movie2 = ("/home/pi/sss5/vid2.mp4")movie3 = ("/home/pi/sss5/vid3.mp4")movie4 =("/home/pi/sss5/vid4.mp4")os.system('killall omxplayer.bin')omxc = Popen(['omxplayer','-b',movie4])ser = serial.Serial('/dev/ttyUSB0',9600)while True:data = ser.readline()if data == "a":os.system('killall omxplayer.bin')print "a"omxc= Popen(['omxplayer','-b',movie1])elif data == "b":os.system('killall ommxplayer.bin')print "b"omxc = Popen(['omxplayer','-b',movie2])elif data == "c":os.system('killall omxplayer.bin')print "c"omxc = Popen(['omxplayer','-b',movie3])wh...see more »sir, next things which i had done is .the python script:import sysimport osfrom subprocess import Popenimport serialmovie1 = ("/home/pi/sss5/vid1.mp4")movie2 = ("/home/pi/sss5/vid2.mp4")movie3 = ("/home/pi/sss5/vid3.mp4")movie4 =("/home/pi/sss5/vid4.mp4")os.system('killall omxplayer.bin')omxc = Popen(['omxplayer','-b',movie4])ser = serial.Serial('/dev/ttyUSB0',9600)while True:data = ser.readline()if data == "a":os.system('killall omxplayer.bin')print "a"omxc= Popen(['omxplayer','-b',movie1])elif data == "b":os.system('killall ommxplayer.bin')print "b"omxc = Popen(['omxplayer','-b',movie2])elif data == "c":os.system('killall omxplayer.bin')print "c"omxc = Popen(['omxplayer','-b',movie3])when this script is run the movie4 has to play contionously until the some data is read serially and then play the respected video.it starts with the movie4 but then something happens and nothing is displayed on the screen.can you help me out with this ??

    sir, the problem is solved"data = ser.readline()" had to be "data= ser.read()"the python script:import sysimport osfrom subprocess import Popenimport serialmovie1 = ("/home/pi/sss5/vid1.mp4")movie2 = ("/home/pi/sss5/vid2.mp4")movie3 = ("/home/pi/sss5/vid3.mp4")ser = serial.Serial('/dev/ttyUSB0',9600)while True:data = ser.read()if data == "a":os.system('killall omxplayer.bin')print "a"omxc = Popen(['omxplayer','-b',movie1])elif data == "b":os.system('killall ommxplayer.bin')print "b"omxc = Popen(['omxplayer','-b',movie2])elif data == "c":os.system('killall omxplayer.bin')print "c"omxc = Popen(['omxplayer','-b',movie3])and now the videos are playing but the transition from one vid...see more »sir, the problem is solved"data = ser.readline()" had to be "data= ser.read()"the python script:import sysimport osfrom subprocess import Popenimport serialmovie1 = ("/home/pi/sss5/vid1.mp4")movie2 = ("/home/pi/sss5/vid2.mp4")movie3 = ("/home/pi/sss5/vid3.mp4")ser = serial.Serial('/dev/ttyUSB0',9600)while True:data = ser.read()if data == "a":os.system('killall omxplayer.bin')print "a"omxc = Popen(['omxplayer','-b',movie1])elif data == "b":os.system('killall ommxplayer.bin')print "b"omxc = Popen(['omxplayer','-b',movie2])elif data == "c":os.system('killall omxplayer.bin')print "c"omxc = Popen(['omxplayer','-b',movie3])and now the videos are playing but the transition from one video to next is not fast and i can see the terminal script running between the change of two video.also sometimes two videos are mixed and played together like one video is running in background while other is playing.is there a way in which the lag between two video transition can be minimised and how to avoid two video mixing.

    beside lag, sometimes two videos are mixed and played together. can u help me out with this?

    when i run the python script.the 1st movie starts playing. then when the serial data is recieved the terminal some script is run and the pi goes to power saver mode and if "esc" is pressed it returns to play the video.

    View Instructable »
  • shramik4954 followed ThothLoki1 week ago
      • Play Video With Python and GPIO
      • Portable Arduino Uno Temperature and Humidity Sensor with LCD Screen
  • shramik4954 commented on ThothLoki's instructable Play Video With Python and GPIO1 week ago
    Play Video With Python and GPIO

    thank u sir,but nothing is happening.even the print line is not showing. can you help me out with it.this is the python script:import sysimport osfrom subprocess import Popenimport serialmovie1 = ("/home/pi/sss5/vid1.mp4")movie2 = ("/home/pi/sss5/vid2.mp4")movie3 = ("/home/pi/sss5/vid3.mp4")ser = serial.Serial('/dev/ttyUSB0',9600)while True: data = ser.readline() if data == "a": os.system('killall omxplayer.bin') print "a" omxc = Popen(['omxplayer','-b',movie1]) elif data == "b": os.system('killall ommxplayer.bin') print "b" omxc = Popen(['omxplayer','-b',movie2]) elif data == "c": o...see more »thank u sir,but nothing is happening.even the print line is not showing. can you help me out with it.this is the python script:import sysimport osfrom subprocess import Popenimport serialmovie1 = ("/home/pi/sss5/vid1.mp4")movie2 = ("/home/pi/sss5/vid2.mp4")movie3 = ("/home/pi/sss5/vid3.mp4")ser = serial.Serial('/dev/ttyUSB0',9600)while True: data = ser.readline() if data == "a": os.system('killall omxplayer.bin') print "a" omxc = Popen(['omxplayer','-b',movie1]) elif data == "b": os.system('killall ommxplayer.bin') print "b" omxc = Popen(['omxplayer','-b',movie2]) elif data == "c": os.system('killall omxplayer.bin') print "c" omxc = Popen(['omxplayer','-b',movie3])

    View Instructable »
  • shramik4954 commented on ThothLoki's instructable Play Video With Python and GPIO2 weeks ago
    Play Video With Python and GPIO

    hii have connected 3 laser trigger to arduino and connected arduiono to pi using usb. whenever the laser is blocked the arduino sends char to pi serially. fro 1st laser the pi receives char a, for 2nd b and 3rd laser c. so can i play a video for each laser trigger ?

    View Instructable »