The idea of the program is to be able to scan bar-codes and have it play a corresponding video, that part works fine.
But I also want the screen to be either black or display some other picture like "please scan object" or something at all times when the videos aren't playing, basically once I start this program I don't want to see the Rasbian desktop.
And this is where I seem to be having trouble, first when I start the program the screen goes black like it should but then as soon as I scan something it closes the black picture and I have to re-scan whatever I just scanned to open the video.
Second whenever the black picture is up there is text showing what file is open etc at the bottom of the screen that I don't want there.
I don't even know if fbi is the best way to do this so any suggestions would be helpful
Thanks in advance!
Code: Select all
while True: import os os.system("sudo fbi -d /dev/fb0 -a -T 2 -v black-screen.jpg") name=input("Please scan object") addressbook = open("ab.txt") for line in addressbook: record = line.split('|') if record == name: found = True break else: found = False continue if found == False: print("Object not found") else: number=(record) path=("/media/pi/USB DISK/Pyro Preview/videos/") os.system("sudo killall fbi") import sys movie_path = ((path)+(number)) from subprocess import Popen omxp = Popen(['omxplayer',movie_path])