Go to advanced search

by jehutting
Mon Aug 14, 2017 9:33 pm
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 8456

Re: Play mp3 file dependant on python output

Oeps...yes, you changed the music folder to /home/pi/Desktop. Sorry, missed that when I was modifying your last posted code. Strange that it isn't waiting for the completion (process.wait() should do the trick.) Do you see multiple instances of mpg321 when executing 'top' or 'htop'? I'm already in t...
by jehutting
Mon Aug 14, 2017 7:32 pm
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 8456

Re: Play mp3 file dependant on python output

Something like attached?
It is a quick and dirty proof of concept.
by jehutting
Mon Aug 14, 2017 3:45 pm
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 8456

Re: Play mp3 file dependant on python output

Yes.. use python's basic type list . Use the list function append to add the selected track to this list. A thread could then -in a while loop- use the list function pop(0) to get the first track from the list and play it (with the Popen function). After the Popen function, you can with the subproce...
by jehutting
Mon Aug 14, 2017 3:00 pm
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 8456

Re: Play mp3 file dependant on python output

OK...took some time to figure out why the Popen throwed an exception :D The problem is the missing of the following line:

Code: Select all

import subprocess
Put it at the top of the file (below "import logging").
by jehutting
Mon Aug 14, 2017 1:30 pm
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 8456

Re: Play mp3 file dependant on python output

OK... but what exactly doesn't work? When you execute on the command line cat /var/log/jukeboxcontroller.log what do you get? Expect to see some "+++ TRACK FOUND +++... " lines for every button you pressed on your wallbox. Do you get the print-statement of the play_song function? Expect to see the l...
by jehutting
Mon Aug 14, 2017 12:31 pm
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 8456

Re: Play mp3 file dependant on python output

The code is, apart from some added space characters, the same as the pastebin'ed code.
The subprocess line is still part of the if statement! Remove 2 spaces at the beginning of the subprocess line.
by jehutting
Mon Aug 14, 2017 7:01 am
Forum: Advanced users
Topic: Multiple omxplayer instance window "multiviewer"
Replies: 21
Views: 20126

Re: Multiple omxplayer instance window "multiviewer"

There are issues with omxplayer's --live option (see e.g. omxplayer repository issue 441 ). Try it without using the --live option. If it still doesn't work add the -g option to the (4th) command to create an omxplayer.log file. Using --refresh only to one command as it will be used for all running ...
by jehutting
Mon Aug 14, 2017 5:33 am
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 8456

Re: Play mp3 file dependant on python output

The (faulty) indentation of the subprocess line causes it that the statement isn't executed when ACTIVE_PROCESS is None (which is the case upon initial play). Correct the indentation so the subprocess statement is not part of the if-statement. def play_song(track) : print "Playing Track %s" % track ...
by jehutting
Wed Aug 09, 2017 6:06 pm
Forum: Español
Topic: OMXPLAYER reproducir Carpeta? con mp3 sin entorno gráfico
Replies: 5
Views: 1628

Re: OMXPLAYER reproducir Carpeta? con mp3 sin entorno gráfico

Hola

No hablo español, y google translate hace que sea difícil de entender, probablemente lo mismo que esto :D
Sin embargo, echa un vistazo omxplayer-player.

Saludos cordiales,
Jozef Hutting
by jehutting
Tue Feb 28, 2017 6:11 pm
Forum: Graphics, sound and multimedia
Topic: Question about DAC
Replies: 32
Views: 11086

Re: Question about DAC

@hollol,

Sorry but I don't have answers on both your questions.

I didn't tried to generate the SCL myself. Just like the filtering it is all stuff far above my knowledge.
And as the board just sounds fine to me, I actually didn't bother to understand it... :)
by jehutting
Sun Jan 22, 2017 6:15 am
Forum: Other projects
Topic: Interfacing PIR to Raspberry PI
Replies: 15
Views: 2990

Re: Interfacing PIR to Raspberry PI

A Raspberry Pi GPIO input shouldn't be connected to a 5V level.
by jehutting
Sun Jan 22, 2017 6:06 am
Forum: General discussion
Topic: PIR Triggered OMXPLAYER Playlists
Replies: 1
Views: 1259

Re: PIR Triggered OMXPLAYER Playlists

Have a look at my github omxplayer-pir and omxplayer-player.

Should be easy to combine. If not...don't hesitate to mail me.
by jehutting
Sat Jan 21, 2017 6:48 am
Forum: Graphics, sound and multimedia
Topic: Omxplayer to play a list of files sans GUI
Replies: 12
Views: 36847

Re: Omxplayer to play a list of files sans GUI

Something like this? #!/bin/bash # infinity-looper-2.sh # Infinite looping script # J.E.HUTTING 21-JAN-2017 #set -x # expand the commands # set here the files to play --------------------------------------------------- FILES=`ls /aragorn/music/singles/T*.mp3` # --------------------------------------...
by jehutting
Sat Jan 21, 2017 6:30 am
Forum: Python
Topic: how to play next .mp3 using omxplayer-wrapper / omxplayer
Replies: 4
Views: 1786

Re: how to play next .mp3 using omxplayer-wrapper / omxplaye

I am currently working on my omxplayer-player . It uses a simple class (OMXPlayer) to wrap (the real) omxplayer. Another class (Player) is driving this wrapper class. Some Play/Next/Previous (GPIO) buttons and keyboard keys control the playing. Just replacing my simple wrapper by omxplayer-wrapper s...
by jehutting
Sat Jan 21, 2017 6:22 am
Forum: Python
Topic: omxplayer playlist from array
Replies: 2
Views: 2514

Re: omxplayer playlist from array

I am currently working on my omxplayer-player . It uses a simple class (OMXPlayer) to wrap (the real) omxplayer. Another class (Player) is driving this wrapper class. Some Play/Next/Previous (GPIO) buttons and keyboard keys control the playing. A better wrapper would be Will Price OMXPlayer wrapper ...
by jehutting
Sun Jan 08, 2017 8:45 am
Forum: General discussion
Topic: COMPLETED AND FIXED Raspberry pi as mp3 player without LCD?
Replies: 136
Views: 25043

Re: Raspberry pi as mp3 player without LCD?

I made my own variant of this request on omxplayer-player . It uses omxplayer to play the .mp3 files found in a directory (/folder). With three buttons (Play/Previous/Next) you can direct the player. With the Play button you can pause and resume the playing. There is also a LED added, which turns on...
by jehutting
Sun Jan 08, 2017 8:33 am
Forum: Nederlands
Topic: LIRC,GPIO en Python
Replies: 10
Views: 2131

Re: LIRC,GPIO en Python

Hopelijk doet je LED het inderdaad :-) Voor de duidelijkheid het verschil tussen GPIO.BCM en GPIO.BOARD modes. GPIO.setmode(GPIO.BCM) --> Broadcom GPIO nummering GPIO.setmode(GPIO.BOARD) -- Board pin nummering Bijvoorbeeld: Broadcom GPIO nummering GPIO26 is gelijk aan Board pin nummer 37. Board pin ...
by jehutting
Sat Jan 07, 2017 5:05 pm
Forum: Nederlands
Topic: LIRC,GPIO en Python
Replies: 10
Views: 2131

Re: LIRC,GPIO en Python

GPIO pin nummer 26 is toch de ene laatste van de rechter rij en GRND de laaste van de rechter rij. Niet volgens hier . Je hebt waarschijnlijk een Model B (26 pin of 2x13 gpio header) => Pi 1 Model A/B (Revision 2.0) is de layout die je moet hebben. Dus je moet meten tussen de laatse pinnen van zowe...
by jehutting
Fri Jan 06, 2017 4:53 pm
Forum: Nederlands
Topic: LIRC,GPIO en Python
Replies: 10
Views: 2131

Re: LIRC,GPIO en Python

Controleer of je de juiste PIN nummer gebruikt. Je code gebruikt GPIO.setmode (GPIO.BOARD) GPIO.setup(26, GPIO.OUT) RPi.GPIO ken twee modes: GPIO.setmode(GPIO.BCM) --> Broadcom GPIO nummering GPIO.setmode(GPIO.BOARD) -- board pin nummering Je LED moet dus op PIN26 aangesloten zijn. Verder kan je con...
by jehutting
Thu Jan 05, 2017 7:10 pm
Forum: Nederlands
Topic: LIRC,GPIO en Python
Replies: 10
Views: 2131

Re: LIRC,GPIO en Python

Jawel hoor. Ik heb print statements aan je script toegevoegd. #!/usr/bin/env python import pygame, sys from pygame.locals import * import RPi.GPIO as GPIO GPIO.setwarnings(False) GPIO.setmode (GPIO.BOARD) GPIO.setup(26, GPIO.OUT) GPIO.output(26,GPIO.LOW) pygame.init() BLACK = (0,0,0) WIDTH = 100 HEI...
by jehutting
Wed Jan 04, 2017 8:38 pm
Forum: Nederlands
Topic: LIRC,GPIO en Python
Replies: 10
Views: 2131

Re: LIRC,GPIO en Python

Probeer eens pygame.K_1 ipv pygame.KEY_1.
by jehutting
Thu Dec 29, 2016 7:46 am
Forum: Python
Topic: Motion activated video player (PIR sensor)
Replies: 14
Views: 11155

Re: Motion activated video player (PIR sensor)

As the mailing on watched threads seems to work randomly -seems I have more luck lately :lol: -, I missed @GiggityPcs posts.
So @GiggityPcs, how did it went? Just being curious.
by jehutting
Thu Dec 29, 2016 7:35 am
Forum: General discussion
Topic: COMPLETED AND FIXED Raspberry pi as mp3 player without LCD?
Replies: 136
Views: 25043

Re: Raspberry pi as mp3 player without LCD?

We (as in this community and I) can help you to get this project up and running. But I am sure that someone has done this (python/gpio/omxplayer) before. So first, let us wait for someone to response. Otherwise I offer to create one for us (as in for you, me and maybe others who want to have it too)...
by jehutting
Thu Dec 29, 2016 5:22 am
Forum: General discussion
Topic: COMPLETED AND FIXED Raspberry pi as mp3 player without LCD?
Replies: 136
Views: 25043

Re: Raspberry pi as mp3 player without LCD?

Use the mp3_files array with a zero-based index: index 0 is the first file in the list, index 2 the second...index 9 is the last one. As you are not doing so, you have - or at least it should- run 2,3,4,5,6,7,8,9,1,2,3,... File on index 0 is never played. Be aware of subprocess.Popen runs as a child...
by jehutting
Wed Dec 28, 2016 4:07 pm
Forum: Beginners
Topic: CAN data help.
Replies: 5
Views: 1169

Re: CAN data help.

OK... so than these 8 data bytes are specific for your vehicle. You say you have a user guide; is this somewhere public available?

Go to advanced search