• displaying images to hdmi1 using fbi or fim

    Help and Support
    2
    0 Votes
    2 Posts
    410 Views
    J

    Well I finally found another image viewer that lets me specify something to display on the second hdmi port: vlc!

    But although it worked fine on FKMS, nothing showed up when I ran it with KMS... not sure if I’m doing something wrong or if that is expected.

  • 0 Votes
    8 Posts
    1k Views
    SickoDuckoS

    @mitu I checked out those points you recommended and they all seem fine. Im going to seem like total idiot now.. Everything else was fine but I just had to update the retropie setup. Then I updated the emulator again. I updated everything not too long time ago so I had no idea it could be that. I even uninstalled and re-installed the psx emulator and updated it before doing this. Now im wiser and can potentially help some other people in the future.

    I really appreciate your help, it pushed me to right direction.

  • 0 Votes
    20 Posts
    6k Views
    *

    @sinibomb

    This was just a simple change to the popular shutdown button script

    But this played two audio files and displays an image on Shutdown, change .wav and .PNG file names to suit

    shutdown.py

    #!/usr/bin/python import RPi.GPIO as GPIO import time import subprocess # we will use the pin numbering to match the pins on the Pi, instead of the # GPIO pin outs (makes it easier to keep track of things) GPIO.setmode(GPIO.BOARD) # use the same pin that is used for the reset button (one button to rule them all!) GPIO.setup(5, GPIO.IN, pull_up_down = GPIO.PUD_UP) oldButtonState1 = True while True: #grab the current button state buttonState1 = GPIO.input(5) # check to see if button has been pushed if buttonState1 != oldButtonState1 and buttonState1 == False: # start playing silence to keep audio channel open to prevent missing beginning audio myinput = open('/dev/zero') subprocess.Popen(['/usr/bin/aplay', '-c2', '-r48000', '-fS16_LE', '-N' ], stdin=myinput ) # start showing screen (underneath emulationstation) subprocess.call("/home/pi/scripts/showImg.sh", shell=True) time.sleep(1) # play audio 1
    subprocess.call("/usr/bin/aplay /home/pi/scripts/audio_1.wav", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) time.sleep(2) # quit emulation station subprocess.call("killall -SIGQUIT emulationstation", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) time.sleep(1) # play audio 2 subprocess.call("/usr/bin/aplay /home/pi/scripts/audio_2.wav", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) time.sleep(3) # shutdown subprocess.call("shutdown -h now", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) oldButtonState1 = buttonState1 time.sleep(.5)

    showImg.sh

    #!/bin/sh sudo /usr/bin/fbi -T 2 -once -t 30 -noverbose -a "/home/pi/scripts/image.png" &