Go to advanced search

by jehutting
Tue Jan 26, 2016 12:04 am
Forum: Troubleshooting
Topic: omxplayer and keybindings
Replies: 19
Views: 3452

Re: omxplayer and keybindings

(hopefully this works, not sure) Ping @gkreidl

Is it possible for you to answer Mark's dbus question? Is kweb doing something similar?
by jehutting
Wed Jan 20, 2016 9:56 pm
Forum: Graphics, sound and multimedia
Topic: Starting Omxplayer from cold
Replies: 8
Views: 1551

Re: Starting Omxplayer from cold

In case of an unmounted usb-drive, I would expect omxplayer to respond with File "/media/Films/movie.mkv" not found. Try to run omxplayer with the genlog (-g) option (so, omxplayer -g -r -o hdmi /media/Films/movie.mkv ). This gives an omxplayer.log file, which may reveal the ERROR. Also execute echo...
by jehutting
Sun Jan 17, 2016 10:47 am
Forum: Python
Topic: santa detector not working in python
Replies: 6
Views: 1080

Re: santa detector not working in python

GPIO access without root permission is ONLY possible with Raspbian Jessie, not with Wheezy. OR.... :D ... did I missed something to install? Just update/upgrade/rpi-update'd my RPI Wheezy, but still I need to have to sudo. :oops: EDIT: I was wrong...it is possible too with Wheezy. access-gpio-pins-w...
by jehutting
Sun Jan 17, 2016 9:39 am
Forum: Python
Topic: Playing Video Using External Interaction (Buttons etc)
Replies: 7
Views: 2065

Re: Playing Video Using External Interaction (Buttons etc)

I wouldn't use the os.system(). It is an old function and it is better to use the subprocess module Replacing Older Functions . Also be careful with the & at the end of your (os.system) command. It makes omxplayer to run as a so-called background process. That's why -after doing the os.system call- ...
by jehutting
Sun Jan 17, 2016 6:26 am
Forum: Python
Topic: santa detector not working in python
Replies: 6
Views: 1080

Re: santa detector not working in python

The message

Code: Select all

RuntimeError: No access to /dev/mem. Try running as root!
means you have to run your script with

Code: Select all

sudo python hi.py
Accessing the GPIO needs root permission.
by jehutting
Sun Jan 17, 2016 6:15 am
Forum: Python
Topic: First Time python user
Replies: 6
Views: 1204

Re: First Time python user

You have to change rane into range (add the missing g).

Have a look at The range() Function.
by jehutting
Fri Jan 15, 2016 11:49 pm
Forum: Python
Topic: modifie adafruit video_looper to check button input
Replies: 8
Views: 1395

Re: modifie adafruit video_looper to check button input

What you are missing is actually the line with the output option of OMXPlayer. In case that you want the 3.5 mm jack (analog) output add args.extend(['-o', 'local']) # force to use the 3.5 mm jack (analog) when using the subprocess.Popen(args,... construction or with the current one self.playProcess...
by jehutting
Tue Jan 12, 2016 5:04 pm
Forum: Troubleshooting
Topic: omxplayer and keybindings
Replies: 19
Views: 3452

Re: omxplayer and keybindings

During the "idle" (when I don't press any char) I continuosly get chnum = 0, ch[0] = -1 because getchar() returns EOF, OK. Just the behaviour I would expect, so seems OK to me too. If your getchar() works with your program, than your program is correctly connected to the /dev/tty<x> which handles t...
by jehutting
Mon Jan 11, 2016 6:14 pm
Forum: Troubleshooting
Topic: omxplayer and keybindings
Replies: 19
Views: 3452

Re: omxplayer and keybindings

Hi Mark, Did your dbus session worked when you ran omxplayer.bin directly (so bypassing the script)? Have a look at omplayer github issue #59 or other issues with dbus. I don't use the script and my dbus session is working fine (at least when I ssh -X , but that I already told you above). Can you ch...
by jehutting
Sun Jan 10, 2016 8:50 pm
Forum: Troubleshooting
Topic: omxplayer and keybindings
Replies: 19
Views: 3452

Re: omxplayer and keybindings

Hi Mark, /usr/bin/omxplayer is an executable bash script. Sorry can't verify that; I run my own /usr/bin/omxplayer (real) executable (.bin) and don't have the original one by hand. As far as I can see your dbus looks OK. I see however that the omxplayer script does a dbus-daemon --fork --print-addre...
by jehutting
Sun Jan 10, 2016 5:30 pm
Forum: Troubleshooting
Topic: omxplayer and keybindings
Replies: 19
Views: 3452

Re: omxplayer and keybindings

Hi Mark, When you run omxplayer you actually start a bash script omxplayer . This script creates (forks) in line #46 "a SESSION dbus-deamon for omxplayer", and if all went well creates in lines #52 and #53 the /tmp/omxplayerdbus.<user> files. Apparently line #46 fails. Try to execute $ ps xaf | grep...
by jehutting
Sat Jan 09, 2016 10:39 pm
Forum: Beginners
Topic: Screaming jellybaby programming
Replies: 78
Views: 9417

Re: Screaming jellybaby programming

NOOOO....don't give up. I have to say that you are doing a great job in coming so far :!: :!: :!: And you are almost there. If you used the following burp.py code/file import time import RPi.GPIO as GPIO import os GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(3, GPIO.IN) while True: if G...
by jehutting
Fri Jan 08, 2016 8:30 pm
Forum: Troubleshooting
Topic: omxplayer and keybindings
Replies: 19
Views: 3452

Re: omxplayer and keybindings

Run omxplayer with option -g . This gives a log file omxplayer.log . When you press e.g. the space key a log line DEBUG: Keyboard: character (0x20) should be logged. Below that line should be a line DEBUG: Popped message member: Action interface: org.mpris.MediaPlayer2.Player type: 1 path: /org/mpri...
by jehutting
Thu Jan 07, 2016 6:51 pm
Forum: Beginners
Topic: Python pygame in python 2.7.9 and 3.4.2
Replies: 11
Views: 3232

Re: Python pygame in python 2.7.9 and 3.4.2

Your script "/home/pi/Documents/pygame.py" shouldn't be named pygame.py.
See here why and how to solve it.
by jehutting
Wed Jan 06, 2016 12:58 am
Forum: Troubleshooting
Topic: Burping Jellybaby error: pull up resistor is fitted
Replies: 15
Views: 2351

Re: Burping Jellybaby error: pull up resistor is fitted

Glad to read that you got it working. Well, the & at the end of a line means that you are going to run the command as a so-called background process. When running in a LXTerminal sudo idle3 & idle3 should have pop-up'ed the python shell and the LXTerminal should (still) be available to enter new com...
by jehutting
Tue Jan 05, 2016 8:59 pm
Forum: Troubleshooting
Topic: Burping Jellybaby error: pull up resistor is fitted
Replies: 15
Views: 2351

Re: Burping Jellybaby error: pull up resistor is fitted

@1lovcars: sorry I didn't put a watch on this thread and yesterday I stumbled upon here that you are trying to get this to work, but got stuck with a freezing shell. As far as I understood that thread, it doesn't work from the GUI / IDLE3 / Python shell. I too started with sudo idle3 & but this does...
by jehutting
Sat Oct 03, 2015 1:41 pm
Forum: General discussion
Topic: Sensor working 24/7 script
Replies: 11
Views: 1547

Re: Sensor working 24/7 script

Heater, I'm old fashioned :D . Is it possible in python to have something similar (a loop-less main)?
by jehutting
Sat Oct 03, 2015 12:51 pm
Forum: General discussion
Topic: Sensor working 24/7 script
Replies: 11
Views: 1547

Re: Sensor working 24/7 script

tbl.pl, you are right, there is always (somewhere) a MAIN loop needed while running an application. even with the GPIO interrupt handling. That is what Heater in above post is telling.

What I was trying to point out is that there is no need to check the GPIO input (PIR checking) into the (main) loop.
by jehutting
Sat Oct 03, 2015 10:04 am
Forum: General discussion
Topic: Sensor working 24/7 script
Replies: 11
Views: 1547

Re: Sensor working 24/7 script

Does your PIR sensor needs 'a while loop to run'? Isn't it just connected to a GPIO input, which is False (0,zero) when there is no motion, and True (1,one) when there is motion? If this latter is the case, you can use (python) RPi.GPIO module and use its add_event_detect() to add a callback functio...
by jehutting
Fri Oct 02, 2015 6:23 pm
Forum: Graphics, sound and multimedia
Topic: Dual audio output with omxplayer
Replies: 3
Views: 2608

Re: Dual audio output with omxplayer

What's wrong with OMXPlayer option "-o both"? Should output audio on the analog and hdmi.
by jehutting
Tue Sep 29, 2015 8:31 pm
Forum: Troubleshooting
Topic: Burping Jellybaby error: pull up resistor is fitted
Replies: 15
Views: 2351

Re: Burping Jellybaby error: pull up resistor is fitted

Still no burps with the GPIO3---jumpercable--->GND? :o Well try this code import time import RPi.GPIO as GPIO import os GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(3, GPIO.IN) while True: if GPIO.input(3) == False: print("BURP") #os.system("omxplayer burp.wav") #time.sleep(1) time.slee...
by jehutting
Mon Sep 28, 2015 9:10 pm
Forum: Official Foundation Display
Topic: Multiscreen=AWESOME- how to support via Python/PyGame?
Replies: 22
Views: 9063

Re: Multiscreen=AWESOME- how to support via Python/PyGame?

In "my link" the OP states he uses fbcp to get the dispmanx framebuffer into the framebuffer of the PiTFT. It is a long time ago that I tried it myself with OMXPlayer and it played reasonably well.
by jehutting
Mon Sep 28, 2015 8:49 pm
Forum: Python
Topic: Motion activated video player (PIR sensor)
Replies: 14
Views: 11155

Re: Motion activated video player (PIR sensor)

Hi COmputoman, Yesterday I started making my own omxplayer controlled by a PIR sensor, just for fun. I don't have a PIR sensor, so I used a button to simulate what I figured out out of your code on how a PIR sensor works. It could be wrong :roll: You can find my code here . Hope that it works for yo...
by jehutting
Sun Sep 27, 2015 5:57 pm
Forum: Official Foundation Display
Topic: Multiscreen=AWESOME- how to support via Python/PyGame?
Replies: 22
Views: 9063

Re: Multiscreen=AWESOME- how to support via Python/PyGame?

As far as I know, that's right...it doesn't work.

Although...look here: Kivy seems to work with an Adafruit PiTFT.
by jehutting
Sun Sep 27, 2015 5:25 pm
Forum: Troubleshooting
Topic: Burping Jellybaby error: pull up resistor is fitted
Replies: 15
Views: 2351

Re: Burping Jellybaby error: pull up resistor is fitted

RuntimeWarning: A physical pull up resistor is fitted on this channel! In your case you may ignore the error; you are using GPIO3 which has a pull-up resistor to the 3V3, and you aren't programming the pin to use its internal pull-down resistor. I don't think the Python program freezes; your progra...

Go to advanced search